pub struct RawHeader {
pub version: u32,
pub compact_target: u32,
pub timestamp: u64,
pub number: u64,
pub epoch: u64,
pub parent_hash: [u8; 32],
pub transactions_root: [u8; 32],
pub proposals_hash: [u8; 32],
pub extra_hash: [u8; 32],
pub dao: [u8; 32],
}Fields§
§version: u32§compact_target: u32§timestamp: u64§number: u64§epoch: u64§parent_hash: [u8; 32]§transactions_root: [u8; 32]§proposals_hash: [u8; 32]§extra_hash: [u8; 32]§dao: [u8; 32]Implementations§
Source§impl RawHeader
impl RawHeader
pub fn new( version: u32, compact_target: u32, timestamp: u64, number: u64, epoch: u64, parent_hash: [u8; 32], transactions_root: [u8; 32], proposals_hash: [u8; 32], extra_hash: [u8; 32], dao: [u8; 32], ) -> Self
pub fn molecule(&self) -> Vec<u8> ⓘ
pub fn molecule_decode(data: &[u8]) -> Self
pub fn molecule_size() -> usize
pub fn pack(&self) -> RawHeader
Trait Implementations§
impl Eq for RawHeader
impl StructuralPartialEq for RawHeader
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more