[][src]Struct raftlog::election::Term

pub struct Term(_);

ある選挙ないしリーダの任期期間を識別するための番号.

番号の値は0から始まり「新しい選挙に立候補する」ないし「新しいリーダが選出される」タイミングで、 増加している. なお、この番号は一つのクラスタにおいて常に増加していき、減少することはない.

Methods

impl Term[src]

pub fn new(number: u64) -> Self[src]

値がnumberとなるTermインスタンスを生成する.

pub fn as_u64(self) -> u64[src]

このインスタンスの期間番号の値を返す.

Trait Implementations

impl Clone for Term[src]

impl Copy for Term[src]

impl Debug for Term[src]

impl Default for Term[src]

impl Eq for Term[src]

impl From<u64> for Term[src]

impl Hash for Term[src]

impl Ord for Term[src]

impl PartialEq<Term> for Term[src]

impl PartialOrd<Term> for Term[src]

impl StructuralEq for Term[src]

impl StructuralPartialEq for Term[src]

Auto Trait Implementations

impl RefUnwindSafe for Term

impl Send for Term

impl Sync for Term

impl Unpin for Term

impl UnwindSafe for Term

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.