pub struct RoundData<Id, Timer, Input, Output> {
pub voter_id: Option<Id>,
pub prevote_timer: Timer,
pub precommit_timer: Timer,
pub incoming: Input,
pub outgoing: Output,
}
Expand description
Data necessary to participate in a round.
Fields§
§voter_id: Option<Id>
Local voter id (if any.)
prevote_timer: Timer
Timer before prevotes can be cast. This should be Start + 2T where T is the gossip time estimate.
precommit_timer: Timer
Timer before precommits can be cast. This should be Start + 4T
incoming: Input
Incoming messages.
outgoing: Output
Outgoing messages.
Auto Trait Implementations§
impl<Id, Timer, Input, Output> Freeze for RoundData<Id, Timer, Input, Output>
impl<Id, Timer, Input, Output> RefUnwindSafe for RoundData<Id, Timer, Input, Output>
impl<Id, Timer, Input, Output> Send for RoundData<Id, Timer, Input, Output>
impl<Id, Timer, Input, Output> Sync for RoundData<Id, Timer, Input, Output>
impl<Id, Timer, Input, Output> Unpin for RoundData<Id, Timer, Input, Output>
impl<Id, Timer, Input, Output> UnwindSafe for RoundData<Id, Timer, Input, Output>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more