pub struct LatestBlock<B: BlockNumber> { /* private fields */ }Expand description
Used in Network::wait_for_latest_block
Represents the latest block available in the blockchain, along with a block to rollback to if a fork was detected.
Implementations§
Source§impl<B: BlockNumber> LatestBlock<B>
impl<B: BlockNumber> LatestBlock<B>
pub fn new(advance_to: B) -> Self
pub fn with_rollback(self, rollback_to: B) -> Self
pub fn advance_to(&self) -> B
pub fn rollback_to(&self) -> Option<B>
Trait Implementations§
Source§impl<B: Clone + BlockNumber> Clone for LatestBlock<B>
impl<B: Clone + BlockNumber> Clone for LatestBlock<B>
Source§fn clone(&self) -> LatestBlock<B>
fn clone(&self) -> LatestBlock<B>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl<B> Freeze for LatestBlock<B>where
B: Freeze,
impl<B> RefUnwindSafe for LatestBlock<B>where
B: RefUnwindSafe,
impl<B> Send for LatestBlock<B>
impl<B> Sync for LatestBlock<B>
impl<B> Unpin for LatestBlock<B>
impl<B> UnwindSafe for LatestBlock<B>where
B: UnwindSafe,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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