Block

Type Alias Block 

Source
pub type Block = BlockGeneric<BlockBody>;

Aliased Type§

#[repr(C)]
pub struct Block { pub time: i64, pub nonce: u32, pub pre_hash: Digest, pub merkle_hash: Digest, pub difficulty: u32, pub body: BlockBody, }

Fields§

§time: i64§nonce: u32§pre_hash: Digest§merkle_hash: Digest§difficulty: u32§body: BlockBody

Implementations§

Source§

impl Block

Source

pub fn new(header: BlockHeader) -> Self

Source

pub fn header(&mut self) -> &mut BlockHeader

Trait Implementations§

Source§

impl Borrow<BlockGeneric<()>> for Block

Source§

fn borrow<'a>(&'a self) -> &'a BlockHeader

Immutably borrows from an owned value. Read more
Source§

impl BorrowMut<BlockGeneric<()>> for Block

Source§

fn borrow_mut<'a>(&'a mut self) -> &'a mut BlockHeader

Mutably borrows from an owned value. Read more