[][src]Enum raftlog::log::LogEntry

pub enum LogEntry {
    Noop {
        term: Term,
    },
    Config {
        term: Term,
        config: ClusterConfig,
    },
    Command {
        term: Term,
        command: Vec<u8>,
    },
}

ログに格納されるエントリ.

Variants

Noop

特に内容を持たないエントリ.

リーダ選出時には、最初にこのエントリがログに追加され、 Termが変わったことを記録する.

Fields of Noop

term: Term
Config

クラスタ構成の変更を共有するためのエントリ.

Fields of Config

term: Termconfig: ClusterConfig
Command

状態機械の入力となるコマンドを格納したエントリ.

Fields of Command

term: Termcommand: Vec<u8>

Methods

impl LogEntry[src]

pub fn term(&self) -> Term[src]

このエントリが発行されたTermを返す.

Trait Implementations

impl Clone for LogEntry[src]

impl Debug for LogEntry[src]

impl Eq for LogEntry[src]

impl PartialEq<LogEntry> for LogEntry[src]

impl StructuralEq for LogEntry[src]

impl StructuralPartialEq for LogEntry[src]

Auto Trait Implementations

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.