Skip to main content

LeaderKey

Trait LeaderKey 

Source
pub trait LeaderKey:
    Send
    + Sync
    + Debug {
    // Required methods
    fn name(&self) -> &[u8] ⓘ;
    fn key(&self) -> &[u8] ⓘ;
    fn revision(&self) -> i64;
    fn lease_id(&self) -> i64;
}
Expand description

LeaderKey is a key that represents the leader of metasrv. The structure is corresponding to [etcd_client::LeaderKey].

Required Methods§

Source

fn name(&self) -> &[u8] ⓘ

The name in byte. name is the election identifier that corresponds to the leadership key.

Source

fn key(&self) -> &[u8] ⓘ

The key in byte. key is an opaque key representing the ownership of the election. If the key is deleted, then leadership is lost.

Source

fn revision(&self) -> i64

The creation revision of the key.

Source

fn lease_id(&self) -> i64

The lease ID of the election leader.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl LeaderKey for LeaderKey

Source§

fn name(&self) -> &[u8] ⓘ

Source§

fn key(&self) -> &[u8] ⓘ

Source§

fn revision(&self) -> i64

Source§

fn lease_id(&self) -> i64

Implementors§