pub struct RawHeader(_);
Implementations
sourceimpl RawHeader
impl RawHeader
pub const TOTAL_SIZE: usize = 192usize
pub const FIELD_SIZES: [usize; 10] = _
pub const FIELD_COUNT: usize = 10usize
pub fn version(&self) -> Uint32
pub fn compact_target(&self) -> Uint32
pub fn timestamp(&self) -> Uint64
pub fn number(&self) -> Uint64
pub fn epoch(&self) -> Uint64
pub fn parent_hash(&self) -> Byte32
pub fn transactions_root(&self) -> Byte32
pub fn proposals_hash(&self) -> Byte32
pub fn extra_hash(&self) -> Byte32
pub fn dao(&self) -> Byte32
pub fn as_reader<'r>(&'r self) -> RawHeaderReader<'r>
sourceimpl RawHeader
impl RawHeader
sourcepub fn calc_pow_hash(&self) -> Byte32
pub fn calc_pow_hash(&self) -> Byte32
Calls RawHeaderReader.calc_pow_hash()
for self.as_reader()
.
sourceimpl RawHeader
impl RawHeader
sourcepub fn difficulty(&self) -> U256
pub fn difficulty(&self) -> U256
Calculates the difficulty from compact target.
Trait Implementations
sourceimpl Entity for RawHeader
impl Entity for RawHeader
type Builder = RawHeaderBuilder
const NAME: &'static str = "RawHeader"
fn new_unchecked(data: Bytes) -> Self
fn as_bytes(&self) -> Bytes
fn as_slice(&self) -> &[u8]ⓘNotable traits for &mut [u8]impl Write for &mut [u8]impl Read for &[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 RawHeader
impl Send for RawHeader
impl Sync for RawHeader
impl Unpin for RawHeader
impl UnwindSafe for RawHeader
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