pub struct Header(_);
Implementations§
source§impl Header
impl Header
pub const TOTAL_SIZE: usize = 208usize
pub const FIELD_SIZES: [usize; 2] = _
pub const FIELD_COUNT: usize = 2usize
pub fn raw(&self) -> RawHeader
pub fn nonce(&self) -> Uint128
pub fn as_reader<'r>(&'r self) -> HeaderReader<'r>
source§impl 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.
source§impl 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.
source§impl 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()
.
source§impl 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()
.
Trait Implementations§
source§impl Entity for Header
impl Entity for Header
type Builder = HeaderBuilder
const NAME: &'static str = "Header"
fn new_unchecked(data: Bytes) -> Self
fn as_bytes(&self) -> Bytes
fn as_slice(&self) -> &[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§
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