pub struct HeaderReader<'r>(/* private fields */);
Implementations§
Source§impl<'r> HeaderReader<'r>
impl<'r> HeaderReader<'r>
Sourcepub fn calc_pow_hash(&self) -> Byte32
pub fn calc_pow_hash(&self) -> Byte32
Calls RawHeaderReader.calc_pow_hash()
for self.raw()
.
Sourcepub fn calc_header_hash(&self) -> Byte32
pub fn calc_header_hash(&self) -> Byte32
Calculates the hash for self.as_slice() as the header hash.
Source§impl<'r> HeaderReader<'r>
impl<'r> HeaderReader<'r>
pub const TOTAL_SIZE: usize = 208usize
pub const FIELD_SIZES: [usize; 2] = _
pub const FIELD_COUNT: usize = 2usize
pub fn raw(&self) -> RawHeaderReader<'r>
pub fn nonce(&self) -> Uint128Reader<'r>
Trait Implementations§
Source§impl<'r> Clone for HeaderReader<'r>
impl<'r> Clone for HeaderReader<'r>
Source§fn clone(&self) -> HeaderReader<'r>
fn clone(&self) -> HeaderReader<'r>
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 moreSource§impl<'r> Debug for HeaderReader<'r>
impl<'r> Debug for HeaderReader<'r>
Source§impl<'r> Display for HeaderReader<'r>
impl<'r> Display for HeaderReader<'r>
Source§impl<'r> LowerHex for HeaderReader<'r>
impl<'r> LowerHex for HeaderReader<'r>
Source§impl<'r> Reader<'r> for HeaderReader<'r>
impl<'r> Reader<'r> for HeaderReader<'r>
const NAME: &'static str = "HeaderReader"
type Entity = Header
fn to_entity(&self) -> <HeaderReader<'r> as Reader<'r>>::Entity
fn new_unchecked(slice: &'r [u8]) -> HeaderReader<'r>
fn as_slice(&self) -> &'r [u8] ⓘ
fn verify(slice: &[u8], _compatible: bool) -> Result<(), VerificationError>
fn from_slice(slice: &'r [u8]) -> Result<Self, VerificationError>
fn from_compatible_slice(slice: &'r [u8]) -> Result<Self, VerificationError>
impl<'r> Copy for HeaderReader<'r>
Auto Trait Implementations§
impl<'r> Freeze for HeaderReader<'r>
impl<'r> RefUnwindSafe for HeaderReader<'r>
impl<'r> Send for HeaderReader<'r>
impl<'r> Sync for HeaderReader<'r>
impl<'r> Unpin for HeaderReader<'r>
impl<'r> UnwindSafe for HeaderReader<'r>
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Source§impl<'r, R> FromSliceShouldBeOk<'r> for Rwhere
R: Reader<'r>,
impl<'r, R> FromSliceShouldBeOk<'r> for Rwhere
R: Reader<'r>,
Source§fn from_slice_should_be_ok(slice: &'r [u8]) -> R
fn from_slice_should_be_ok(slice: &'r [u8]) -> R
Unwraps the result of
from_slice(..)
with confidence and we assume that it’s impossible to fail.Source§fn from_compatible_slice_should_be_ok(slice: &'r [u8]) -> R
fn from_compatible_slice_should_be_ok(slice: &'r [u8]) -> R
Unwraps the result of
from_compatible_slice(..)
with confidence and we assume that it’s impossible to fail.