[][src]Struct brb_membership::brb_membership::State

pub struct State<A: Ord, SA, S: Ord> {
    pub id: SA,
    pub gen: Generation,
    pub pending_gen: Generation,
    pub forced_reconfigs: BTreeMap<Generation, BTreeSet<Reconfig<A>>>,
    pub history: BTreeMap<Generation, Vote<A, S>>,
    pub votes: BTreeMap<A, Vote<A, S>>,
    pub faulty: bool,
}

Fields

id: SAgen: Generationpending_gen: Generationforced_reconfigs: BTreeMap<Generation, BTreeSet<Reconfig<A>>>history: BTreeMap<Generation, Vote<A, S>>votes: BTreeMap<A, Vote<A, S>>faulty: bool

Implementations

impl<A, SA, S> State<A, SA, S> where
    A: Actor<S>,
    SA: SigningActor<A, S>,
    S: Sig
[src]

pub fn new() -> Self[src]

pub fn force_join(&mut self, actor: A)[src]

pub fn force_leave(&mut self, actor: A)[src]

pub fn members(&self, gen: Generation) -> Result<BTreeSet<A>, Error<A, S>>[src]

pub fn propose(
    &mut self,
    reconfig: Reconfig<A>
) -> Result<Vec<VoteMsg<A, S>>, Error<A, S>>
[src]

pub fn anti_entropy(&self, from_gen: Generation, actor: A) -> Vec<VoteMsg<A, S>>[src]

pub fn handle_vote(
    &mut self,
    vote: Vote<A, S>
) -> Result<Vec<VoteMsg<A, S>>, Error<A, S>>
[src]

pub fn validate_vote(&self, vote: &Vote<A, S>) -> Result<(), Error<A, S>>[src]

pub fn validate_reconfig(
    &self,
    reconfig: &Reconfig<A>
) -> Result<(), Error<A, S>>
[src]

Trait Implementations

impl<A: Debug + Ord, SA: Debug, S: Debug + Ord> Debug for State<A, SA, S>[src]

impl<A, SA, S> Default for State<A, SA, S> where
    A: Actor<S>,
    SA: SigningActor<A, S>,
    S: Sig
[src]

Auto Trait Implementations

impl<A, SA, S> RefUnwindSafe for State<A, SA, S> where
    A: RefUnwindSafe,
    S: RefUnwindSafe,
    SA: RefUnwindSafe
[src]

impl<A, SA, S> Send for State<A, SA, S> where
    A: Send,
    S: Send,
    SA: Send
[src]

impl<A, SA, S> Sync for State<A, SA, S> where
    A: Sync,
    S: Sync,
    SA: Sync
[src]

impl<A, SA, S> Unpin for State<A, SA, S> where
    SA: Unpin
[src]

impl<A, SA, S> UnwindSafe for State<A, SA, S> where
    A: RefUnwindSafe,
    S: RefUnwindSafe,
    SA: UnwindSafe
[src]

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> Same<T> for T

type Output = T

Should always be Self

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>,