pub struct Block {
pub header: BlockHeader,
pub aux_pow: Option<AuxPow>,
pub transactions: Vec<Transaction>,
}Fields§
§header: BlockHeader§aux_pow: Option<AuxPow>Merged-mining proof: present when this block’s PoW is a parent
chain’s (any registered ASIC algorithm) rather than a native
solution. default keeps pre-auxpow JSON (e.g. the embedded
genesis) readable; no skip_serializing_if — bincode (the p2p wire
format) is not self-describing and must always see the Option tag.
transactions: Vec<Transaction>Implementations§
Source§impl Block
impl Block
pub fn compute_merkle_root(&self) -> Hash32
pub fn serialized_size(&self) -> usize
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Block
impl<'de> Deserialize<'de> for Block
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Block
impl StructuralPartialEq for Block
Auto Trait Implementations§
impl Freeze for Block
impl RefUnwindSafe for Block
impl Send for Block
impl Sync for Block
impl Unpin for Block
impl UnsafeUnpin for Block
impl UnwindSafe for Block
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