pub struct BlockHeader {
pub version: u32,
pub prev_hash: Hash256,
pub merkle_root: Hash256,
pub timestamp: u32,
pub bits: u32,
pub nonce: u32,
}
Expand description
Block header
Fields§
§version: u32
Block version specifying which validation rules to use
prev_hash: Hash256
Hash of the previous block
merkle_root: Hash256
Root of the merkle tree of this block’s transaction hashes
timestamp: u32
Timestamp when this block was created as recorded by the miner
bits: u32
Target difficulty bits
nonce: u32
Nonce used to mine the block
Implementations§
Source§impl BlockHeader
impl BlockHeader
Trait Implementations§
Source§impl Clone for BlockHeader
impl Clone for BlockHeader
Source§fn clone(&self) -> BlockHeader
fn clone(&self) -> BlockHeader
Returns a duplicate 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 Debug for BlockHeader
impl Debug for BlockHeader
Source§impl Default for BlockHeader
impl Default for BlockHeader
Source§fn default() -> BlockHeader
fn default() -> BlockHeader
Returns the “default value” for a type. Read more
Source§impl Hash for BlockHeader
impl Hash for BlockHeader
Source§impl PartialEq for BlockHeader
impl PartialEq for BlockHeader
Source§impl Serializable<BlockHeader> for BlockHeader
impl Serializable<BlockHeader> for BlockHeader
impl Eq for BlockHeader
impl StructuralPartialEq for BlockHeader
Auto Trait Implementations§
impl Freeze for BlockHeader
impl RefUnwindSafe for BlockHeader
impl Send for BlockHeader
impl Sync for BlockHeader
impl Unpin for BlockHeader
impl UnwindSafe for BlockHeader
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