[][src]Enum raft4rs::entity::Entry

pub enum Entry {
    Commit {
        pre_term: u64,
        term: u64,
        index: u64,
        commond: Vec<u8>,
    },
    LeaderChange {
        pre_term: u64,
        term: u64,
        index: u64,
        leader: u64,
    },
    MemberChange {
        pre_term: u64,
        term: u64,
        index: u64,
        node_id: u64,
        action: u8,
    },
    Heartbeat {
        term: u64,
        leader: u64,
        committed: u64,
        applied: u64,
    },
    Vote {
        leader: u64,
        term: u64,
        committed: u64,
    },
    ForwardSubmit {
        commond: Vec<u8>,
    },
    ForwardExecute {
        commond: Vec<u8>,
    },
}

Variants

Commit

Fields of Commit

pre_term: u64term: u64index: u64commond: Vec<u8>
LeaderChange

Fields of LeaderChange

pre_term: u64term: u64index: u64leader: u64
MemberChange

Fields of MemberChange

pre_term: u64term: u64index: u64node_id: u64action: u8
Heartbeat

Fields of Heartbeat

term: u64leader: u64committed: u64applied: u64
Vote

Fields of Vote

leader: u64term: u64committed: u64
ForwardSubmit

Fields of ForwardSubmit

commond: Vec<u8>
ForwardExecute

Fields of ForwardExecute

commond: Vec<u8>

Implementations

impl Entry[src]

pub fn info(&self) -> (u64, u64)[src]

pub fn commit_info(&self) -> (u64, u64, u64)[src]

pub async fn decode_stream<'_>(
    stream: &'_ mut TcpStream
) -> RaftResult<(u64, Self)>
[src]

Trait Implementations

impl Clone for Entry[src]

impl Debug for Entry[src]

impl Decode for Entry[src]

type Item = Self

impl Encode for Entry[src]

Auto Trait Implementations

impl RefUnwindSafe for Entry

impl Send for Entry

impl Sync for Entry

impl Unpin for Entry

impl UnwindSafe for Entry

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,