Struct ckb_types::packed::HeaderReader
source · [−]pub struct HeaderReader<'r>(_);Implementations
sourceimpl<'r> HeaderReader<'r>
impl<'r> HeaderReader<'r>
pub const TOTAL_SIZE: usize
pub const FIELD_SIZES: [usize; 2]
pub const FIELD_COUNT: usize
pub fn raw(&self) -> RawHeaderReader<'r>
pub fn nonce(&self) -> Uint128Reader<'r>
sourceimpl<'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.
Trait Implementations
sourceimpl<'r> Clone for HeaderReader<'r>
impl<'r> Clone for HeaderReader<'r>
sourcefn clone(&self) -> HeaderReader<'r>
fn clone(&self) -> HeaderReader<'r>
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<'r> Debug for HeaderReader<'r>
impl<'r> Debug for HeaderReader<'r>
sourceimpl<'r> Display for HeaderReader<'r>
impl<'r> Display for HeaderReader<'r>
sourceimpl<'r> LowerHex for HeaderReader<'r>
impl<'r> LowerHex for HeaderReader<'r>
sourceimpl<'r> Reader<'r> for HeaderReader<'r>
impl<'r> Reader<'r> for HeaderReader<'r>
type Entity = Header
const NAME: &'static str
fn to_entity(&self) -> Self::Entity
fn new_unchecked(slice: &'r [u8]) -> Self
fn as_slice(&self) -> &'r [u8]ⓘNotable traits for &'_ [u8]impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [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 HeaderReader<'r>
Auto Trait Implementations
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
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<'r, R> FromSliceShouldBeOk<'r> for R where
R: Reader<'r>,
impl<'r, R> FromSliceShouldBeOk<'r> for R where
R: Reader<'r>,
sourcefn 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.
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