pub enum BlockResponse<B: Block> {
Full(SealedBlock<B>),
Empty(SealedHeader<B::Header>),
}Expand description
The block response
Variants§
Full(SealedBlock<B>)
Full block response (with transactions or ommers)
Empty(SealedHeader<B::Header>)
The empty block response
Implementations§
Source§impl<B> BlockResponse<B>where
B: Block,
impl<B> BlockResponse<B>where
B: Block,
Sourcepub fn block_number(&self) -> BlockNumber
pub fn block_number(&self) -> BlockNumber
Return the block number
Sourcepub fn difficulty(&self) -> U256
pub fn difficulty(&self) -> U256
Return the difficulty of the response header
Trait Implementations§
impl<B: Eq + Block> Eq for BlockResponse<B>where
B::Header: Eq,
Source§impl<B: Block> InMemorySize for BlockResponse<B>
impl<B: Block> InMemorySize for BlockResponse<B>
impl<B: PartialEq + Block> StructuralPartialEq for BlockResponse<B>where
B::Header: PartialEq,
Auto Trait Implementations§
impl<B> !Freeze for BlockResponse<B>
impl<B> RefUnwindSafe for BlockResponse<B>where
SealedBlock<B>: RefUnwindSafe,
SealedHeader<<B as Block>::Header>: RefUnwindSafe,
impl<B> Send for BlockResponse<B>
impl<B> Sync for BlockResponse<B>
impl<B> Unpin for BlockResponse<B>
impl<B> UnsafeUnpin for BlockResponse<B>where
SealedBlock<B>: UnsafeUnpin,
SealedHeader<<B as Block>::Header>: UnsafeUnpin,
impl<B> UnwindSafe for BlockResponse<B>where
SealedBlock<B>: UnwindSafe,
SealedHeader<<B as Block>::Header>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 moreimpl<T> MaybeDebug for Twhere
T: Debug,
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.