Struct common_types::header::ExtendedHeader
source · [−]pub struct ExtendedHeader {
pub header: Header,
pub is_finalized: bool,
pub parent_total_difficulty: U256,
}
Expand description
Extended block header, wrapping Header
with finalized and total difficulty information.
Fields
header: Header
The actual header.
is_finalized: bool
Whether the block underlying this header is considered finalized.
parent_total_difficulty: U256
The parent block difficulty.
Implementations
sourceimpl ExtendedHeader
impl ExtendedHeader
sourcepub fn total_score(&self) -> U256
pub fn total_score(&self) -> U256
Returns combined difficulty of all ancestors together with the difficulty of this header.
Trait Implementations
sourceimpl Clone for ExtendedHeader
impl Clone for ExtendedHeader
sourcefn clone(&self) -> ExtendedHeader
fn clone(&self) -> ExtendedHeader
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ExtendedHeader
impl Debug for ExtendedHeader
sourceimpl PartialEq<ExtendedHeader> for ExtendedHeader
impl PartialEq<ExtendedHeader> for ExtendedHeader
sourcefn eq(&self, other: &ExtendedHeader) -> bool
fn eq(&self, other: &ExtendedHeader) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ExtendedHeader) -> bool
fn ne(&self, other: &ExtendedHeader) -> bool
This method tests for !=
.
impl Eq for ExtendedHeader
impl StructuralEq for ExtendedHeader
impl StructuralPartialEq for ExtendedHeader
Auto Trait Implementations
impl RefUnwindSafe for ExtendedHeader
impl Send for ExtendedHeader
impl Sync for ExtendedHeader
impl Unpin for ExtendedHeader
impl UnwindSafe for ExtendedHeader
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more