Struct paxakos::voting::IndiscriminateVoter [−][src]
pub struct IndiscriminateVoter<S, R, C, A, Y, N>(_);
Expand description
A voter that always votes Yea
.
Implementations
Trait Implementations
Returns the “default value” for a type. Read more
type State = S
type State = S
Type of shared state.
type RoundNum = R
type RoundNum = R
Round number type.
type CoordNum = C
type CoordNum = C
Coordination number type.
type Yea = Y
type Yea = Y
Data that will be added to any Yea
vote on proposals.
type Nay = N
type Nay = N
Data that will be added to any Nay
vote on proposals.
type Abstain = A
type Abstain = A
Data that will be added to any Abstain
from elections.
Contemplate a bid for leadership. Read more
fn contemplate_proposal(
&mut self,
_round_num: Self::RoundNum,
_coord_num: Self::CoordNum,
_log_entry: &LogEntryOf<Self::State>,
_leader: Option<&NodeOf<Self::State>>,
_state: Option<&Self::State>
) -> Decision<Self::Yea, Self::Nay, Infallible>
fn contemplate_proposal(
&mut self,
_round_num: Self::RoundNum,
_coord_num: Self::CoordNum,
_log_entry: &LogEntryOf<Self::State>,
_leader: Option<&NodeOf<Self::State>>,
_state: Option<&Self::State>
) -> Decision<Self::Yea, Self::Nay, Infallible>
Contemplate a proposed log entry. Read more
fn observe_commit(
&mut self,
round_num: Self::RoundNum,
coord_num: Self::CoordNum,
log_entry: &LogEntryOf<Self::State>,
leader: Option<&NodeOf<Self::State>>
)
fn observe_commit(
&mut self,
round_num: Self::RoundNum,
coord_num: Self::CoordNum,
log_entry: &LogEntryOf<Self::State>,
leader: Option<&NodeOf<Self::State>>
)
Called for every commit. Read more
Auto Trait Implementations
impl<S, R, C, A, Y, N> RefUnwindSafe for IndiscriminateVoter<S, R, C, A, Y, N> where
A: RefUnwindSafe,
C: RefUnwindSafe,
N: RefUnwindSafe,
R: RefUnwindSafe,
S: RefUnwindSafe,
Y: RefUnwindSafe,
impl<S, R, C, A, Y, N> Send for IndiscriminateVoter<S, R, C, A, Y, N> where
A: Send,
C: Send,
N: Send,
R: Send,
S: Send,
Y: Send,
impl<S, R, C, A, Y, N> Sync for IndiscriminateVoter<S, R, C, A, Y, N> where
A: Sync,
C: Sync,
N: Sync,
R: Sync,
S: Sync,
Y: Sync,
impl<S, R, C, A, Y, N> Unpin for IndiscriminateVoter<S, R, C, A, Y, N> where
A: Unpin,
C: Unpin,
N: Unpin,
R: Unpin,
S: Unpin,
Y: Unpin,
impl<S, R, C, A, Y, N> UnwindSafe for IndiscriminateVoter<S, R, C, A, Y, N> where
A: UnwindSafe,
C: UnwindSafe,
N: UnwindSafe,
R: UnwindSafe,
S: UnwindSafe,
Y: UnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more