pub struct CandidateUncles { /* private fields */ }Expand description
Candidate uncles container
Implementations§
Source§impl CandidateUncles
impl CandidateUncles
Sourcepub fn new() -> CandidateUncles
pub fn new() -> CandidateUncles
Construct new candidate uncles container
Sourcepub fn insert(&mut self, uncle: UncleBlockView) -> bool
pub fn insert(&mut self, uncle: UncleBlockView) -> bool
insert new candidate uncles If the map did not have this value present, true is returned. If the map did have this value present, false is returned.
Sourcepub fn contains(&self, uncle: &UncleBlockView) -> bool
pub fn contains(&self, uncle: &UncleBlockView) -> bool
Returns true if the container contains a value.
Sourcepub fn values(&self) -> impl Iterator<Item = &UncleBlockView>
pub fn values(&self) -> impl Iterator<Item = &UncleBlockView>
Gets an iterator over the values of the map, in order by block_number.
Sourcepub fn remove_by_number(&mut self, uncle: &UncleBlockView) -> bool
pub fn remove_by_number(&mut self, uncle: &UncleBlockView) -> bool
Removes uncles from the container by specified uncle’s number
Sourcepub fn prepare_uncles(
&mut self,
snapshot: &Snapshot,
current_epoch_ext: &EpochExt,
) -> Vec<UncleBlockView>
pub fn prepare_uncles( &mut self, snapshot: &Snapshot, current_epoch_ext: &EpochExt, ) -> Vec<UncleBlockView>
Get uncles from snapshot and current states.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CandidateUncles
impl RefUnwindSafe for CandidateUncles
impl Send for CandidateUncles
impl Sync for CandidateUncles
impl Unpin for CandidateUncles
impl UnsafeUnpin for CandidateUncles
impl UnwindSafe for CandidateUncles
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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