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: BlockBodyImplementations§
Source§impl Block
impl Block
pub fn new(header: BlockHeader) -> Self
pub fn header(&mut self) -> &mut BlockHeader
Trait Implementations§
Source§impl Borrow<BlockGeneric<()>> for Block
impl Borrow<BlockGeneric<()>> for Block
Source§fn borrow<'a>(&'a self) -> &'a BlockHeader
fn borrow<'a>(&'a self) -> &'a BlockHeader
Immutably borrows from an owned value. Read more
Source§impl BorrowMut<BlockGeneric<()>> for Block
impl BorrowMut<BlockGeneric<()>> for Block
Source§fn borrow_mut<'a>(&'a mut self) -> &'a mut BlockHeader
fn borrow_mut<'a>(&'a mut self) -> &'a mut BlockHeader
Mutably borrows from an owned value. Read more