pub struct Header(_);Implementations
sourceimpl Header
impl Header
pub const TOTAL_SIZE: usize
pub const FIELD_SIZES: [usize; 2]
pub const FIELD_COUNT: usize
pub fn raw(&self) -> RawHeader
pub fn nonce(&self) -> Uint128
pub fn as_reader<'r>(&'r self) -> HeaderReader<'r>
sourceimpl Header
impl Header
sourcepub fn as_advanced_builder(&self) -> HeaderBuilder
pub fn as_advanced_builder(&self) -> HeaderBuilder
Creates an advanced builder base on current data.
sourceimpl Header
impl Header
sourcepub fn into_view(self) -> HeaderView
pub fn into_view(self) -> HeaderView
Calculates the header hash and converts into HeaderView with the hash.
sourceimpl Header
impl Header
sourcepub fn calc_pow_hash(&self) -> Byte32
pub fn calc_pow_hash(&self) -> Byte32
Calls HeaderReader.calc_pow_hash() for self.as_reader().
sourceimpl Header
impl Header
sourcepub fn calc_header_hash(&self) -> Byte32
pub fn calc_header_hash(&self) -> Byte32
Calls HeaderReader.calc_header_hash() for self.as_reader().
sourceimpl Header
impl Header
sourcepub fn difficulty(&self) -> U256
pub fn difficulty(&self) -> U256
Calculates the difficulty from compact target.
Trait Implementations
sourceimpl Entity for Header
impl Entity for Header
type Builder = HeaderBuilder
const NAME: &'static str
fn new_unchecked(data: Bytes) -> Self
fn as_bytes(&self) -> Bytes
fn as_slice(&self) -> &[u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
fn from_slice(slice: &[u8]) -> VerificationResult<Self>
fn from_compatible_slice(slice: &[u8]) -> VerificationResult<Self>
fn new_builder() -> Self::Builder
fn as_builder(self) -> Self::Builder
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
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.
sourcefn clone_into(&self, target: &mut T)
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