pub struct RawHeaderReader<'r>(/* private fields */);
Implementations§
Source§impl<'r> RawHeaderReader<'r>
impl<'r> RawHeaderReader<'r>
Sourcepub fn calc_pow_hash(&self) -> Byte32
pub fn calc_pow_hash(&self) -> Byte32
Calculates the hash for self.as_slice() as the pow hash.
Source§impl<'r> RawHeaderReader<'r>
impl<'r> RawHeaderReader<'r>
pub const TOTAL_SIZE: usize = 192usize
pub const FIELD_SIZES: [usize; 10] = _
pub const FIELD_COUNT: usize = 10usize
pub fn version(&self) -> Uint32Reader<'r>
pub fn compact_target(&self) -> Uint32Reader<'r>
pub fn timestamp(&self) -> Uint64Reader<'r>
pub fn number(&self) -> Uint64Reader<'r>
pub fn epoch(&self) -> Uint64Reader<'r>
pub fn parent_hash(&self) -> Byte32Reader<'r>
pub fn transactions_root(&self) -> Byte32Reader<'r>
pub fn proposals_hash(&self) -> Byte32Reader<'r>
pub fn extra_hash(&self) -> Byte32Reader<'r>
pub fn dao(&self) -> Byte32Reader<'r>
Trait Implementations§
Source§impl<'r> Clone for RawHeaderReader<'r>
impl<'r> Clone for RawHeaderReader<'r>
Source§fn clone(&self) -> RawHeaderReader<'r>
fn clone(&self) -> RawHeaderReader<'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 RawHeaderReader<'r>
impl<'r> Debug for RawHeaderReader<'r>
Source§impl<'r> Display for RawHeaderReader<'r>
impl<'r> Display for RawHeaderReader<'r>
Source§impl<'r> LowerHex for RawHeaderReader<'r>
impl<'r> LowerHex for RawHeaderReader<'r>
Source§impl<'r> Reader<'r> for RawHeaderReader<'r>
impl<'r> Reader<'r> for RawHeaderReader<'r>
const NAME: &'static str = "RawHeaderReader"
type Entity = RawHeader
fn to_entity(&self) -> Self::Entity
fn new_unchecked(slice: &'r [u8]) -> Self
fn as_slice(&self) -> &'r [u8] ⓘ
fn verify(slice: &[u8], _compatible: bool) -> VerificationResult<()>
fn from_slice(slice: &'r [u8]) -> Result<Self, VerificationError>
fn from_compatible_slice(slice: &'r [u8]) -> Result<Self, VerificationError>
impl<'r> Copy for RawHeaderReader<'r>
Auto Trait Implementations§
impl<'r> Freeze for RawHeaderReader<'r>
impl<'r> RefUnwindSafe for RawHeaderReader<'r>
impl<'r> Send for RawHeaderReader<'r>
impl<'r> Sync for RawHeaderReader<'r>
impl<'r> Unpin for RawHeaderReader<'r>
impl<'r> UnwindSafe for RawHeaderReader<'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.