Struct ex3_node_types::block::BlockHead
source · pub struct BlockHead {
pub version: u8,
pub height: BlockHeight,
pub p_id: PackageId,
pub pre_block_hash: BlockHash,
pub tx_root: MerkleRoot,
pub balance_changed_root: MerkleRoot,
pub data_integrity_root: MerkleRoot,
pub rejected_tx_root: MerkleRoot,
}Expand description
Block head
Fields§
§version: u8Block version
height: BlockHeightHeight of the block
p_id: PackageIdPackage id of the block
pre_block_hash: BlockHashPrevious block hash
tx_root: MerkleRootTransaction merkle root of the block accepted transactions
balance_changed_root: MerkleRootBalance changed merkle root of the block
data_integrity_root: MerkleRootData integrity merkle root of the block
rejected_tx_root: MerkleRootRejected transaction merkle root of the block rejected transactions
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for BlockHead
impl<'de> Deserialize<'de> for BlockHead
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
source§impl From<BlockHead> for CandidBlockHead
impl From<BlockHead> for CandidBlockHead
source§impl From<BlockHead> for EncodedBlockHead
impl From<BlockHead> for EncodedBlockHead
source§impl From<CandidBlockHead> for BlockHead
impl From<CandidBlockHead> for BlockHead
source§fn from(candid_block_head: CandidBlockHead) -> Self
fn from(candid_block_head: CandidBlockHead) -> Self
Converts to this type from the input type.
source§impl From<EncodedBlockHead> for BlockHead
impl From<EncodedBlockHead> for BlockHead
source§fn from(encoded_head: EncodedBlockHead) -> Self
fn from(encoded_head: EncodedBlockHead) -> Self
Converts to this type from the input type.
source§impl Ord for BlockHead
impl Ord for BlockHead
source§impl PartialEq for BlockHead
impl PartialEq for BlockHead
source§impl PartialOrd for BlockHead
impl PartialOrd for BlockHead
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moresource§impl Storable for BlockHead
impl Storable for BlockHead
source§fn from_bytes(bytes: Cow<'_, [u8]>) -> Self
fn from_bytes(bytes: Cow<'_, [u8]>) -> Self
Converts bytes into an element.
source§fn to_bytes_checked(&self) -> Cow<'_, [u8]>
fn to_bytes_checked(&self) -> Cow<'_, [u8]>
Like
to_bytes, but includes additional checks to ensure the element’s serialized bytes
are within the element’s bounds.impl Eq for BlockHead
impl StructuralEq for BlockHead
impl StructuralPartialEq for BlockHead
Auto Trait Implementations§
impl RefUnwindSafe for BlockHead
impl Send for BlockHead
impl Sync for BlockHead
impl Unpin for BlockHead
impl UnwindSafe for BlockHead
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