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

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]

fn fmt(&self, f: &mut Formatter<'_>) -> Result[src]

Formats the value using the given formatter. Read more

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

fn default() -> Self[src]

Returns the “default value” for a type. Read more

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

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

pub fn vzip(self) -> V