Struct substreams_antelope::pb::HeaderOnlyBlock
source · pub struct HeaderOnlyBlock {
pub id: String,
pub number: u32,
pub header: Option<BlockHeader>,
pub blockroot_merkle: Option<BlockRootMerkle>,
}
Expand description
HeaderOnlyBlock is used to optimally unpack the [Block] structure (note the
corresponding message number for the header
field) while consuming less
memory, when only the header
is desired.
WARN: this is a client-side optimization pattern and should be moved in the consuming code.
Fields§
§id: String
id is the block’s hash.
number: u32
Number is the block’s height at which this block was mined.
header: Option<BlockHeader>
Header contain’s the block’s header information like its parent hash, the merkel root hash and all other information the form a block.
blockroot_merkle: Option<BlockRootMerkle>
A blockroot Merkle tree is a data structure that uses hash functions to organize and verify the integrity of data blocks in a blockchain. Each leaf node contains a hash of a data block, while each non-leaf node contains the hash of its child nodes. The root node contains a single hash that represents all the data in the tree, allowing for efficient verification of data integrity by only checking the root hash.
Trait Implementations§
source§impl Clone for HeaderOnlyBlock
impl Clone for HeaderOnlyBlock
source§fn clone(&self) -> HeaderOnlyBlock
fn clone(&self) -> HeaderOnlyBlock
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for HeaderOnlyBlock
impl Debug for HeaderOnlyBlock
source§impl Default for HeaderOnlyBlock
impl Default for HeaderOnlyBlock
source§fn default() -> HeaderOnlyBlock
fn default() -> HeaderOnlyBlock
source§impl Message for HeaderOnlyBlock
impl Message for HeaderOnlyBlock
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>
fn decode<B>(buf: B) -> Result<Self, DecodeError>
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
self
.source§impl PartialEq for HeaderOnlyBlock
impl PartialEq for HeaderOnlyBlock
impl StructuralPartialEq for HeaderOnlyBlock
Auto Trait Implementations§
impl Freeze for HeaderOnlyBlock
impl RefUnwindSafe for HeaderOnlyBlock
impl Send for HeaderOnlyBlock
impl Sync for HeaderOnlyBlock
impl Unpin for HeaderOnlyBlock
impl UnwindSafe for HeaderOnlyBlock
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)