pub struct StageAdvancer { /* private fields */ }Expand description
1つのラウンドの進め方
Implementations§
Source§impl StageAdvancer
impl StageAdvancer
Sourcepub fn new(round: FinalizationRound, start: u64, step_duration: u64) -> Self
pub fn new(round: FinalizationRound, start: u64, step_duration: u64) -> Self
時刻 start に始めたラウンド round
pub fn round(&self) -> FinalizationRound
Sourcepub fn can_send_prevote(
&self,
time: u64,
aggregator: &MultiRoundAggregator,
) -> bool
pub fn can_send_prevote( &self, time: u64, aggregator: &MultiRoundAggregator, ) -> bool
prevote を出してよいか
Sourcepub fn can_send_precommit(
&self,
time: u64,
aggregator: &MultiRoundAggregator,
) -> Option<Candidate>
pub fn can_send_precommit( &self, time: u64, aggregator: &MultiRoundAggregator, ) -> Option<Candidate>
precommit を出してよければ、その先(best prevote)
Sourcepub fn can_start_next_round(&self, aggregator: &MultiRoundAggregator) -> bool
pub fn can_start_next_round(&self, aggregator: &MultiRoundAggregator) -> bool
次のラウンドに進んでよいか
Trait Implementations§
Source§impl Clone for StageAdvancer
impl Clone for StageAdvancer
Source§fn clone(&self) -> StageAdvancer
fn clone(&self) -> StageAdvancer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for StageAdvancer
Source§impl Debug for StageAdvancer
impl Debug for StageAdvancer
impl Eq for StageAdvancer
Source§impl PartialEq for StageAdvancer
impl PartialEq for StageAdvancer
impl StructuralPartialEq for StageAdvancer
Auto Trait Implementations§
impl Freeze for StageAdvancer
impl RefUnwindSafe for StageAdvancer
impl Send for StageAdvancer
impl Sync for StageAdvancer
impl Unpin for StageAdvancer
impl UnsafeUnpin for StageAdvancer
impl UnwindSafe for StageAdvancer
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