pub struct RawHeader(/* private fields */);
Implementations§
Source§impl 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()
.
Source§impl 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>
Trait Implementations§
Source§impl Difficulty for RawHeader
impl Difficulty for RawHeader
Source§fn difficulty(&self) -> U256
fn difficulty(&self) -> U256
Calculates the difficulty from compact target.
Source§impl Entity for RawHeader
impl Entity for RawHeader
const NAME: &'static str = "RawHeader"
type Builder = RawHeaderBuilder
fn new_unchecked(data: Bytes) -> RawHeader
fn as_bytes(&self) -> Bytes
fn as_slice(&self) -> &[u8] ⓘ
fn from_slice(slice: &[u8]) -> Result<RawHeader, VerificationError>
fn from_compatible_slice(slice: &[u8]) -> Result<RawHeader, VerificationError>
fn new_builder() -> <RawHeader as Entity>::Builder
fn as_builder(self) -> <RawHeader as Entity>::Builder
Auto Trait Implementations§
impl !Freeze for RawHeader
impl RefUnwindSafe for RawHeader
impl Send for RawHeader
impl Sync for RawHeader
impl Unpin for RawHeader
impl UnwindSafe for RawHeader
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
)