Struct substreams_antelope_core::pb::antelope::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§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>where
B: BufMut,
Self: Sized,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
source§fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>where
Self: Sized,
source§fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>where
B: Buf,
Self: Default,
source§fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
. Read moresource§fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Self: Sized,
self
.source§impl PartialEq<HeaderOnlyBlock> for HeaderOnlyBlock
impl PartialEq<HeaderOnlyBlock> for HeaderOnlyBlock
source§fn eq(&self, other: &HeaderOnlyBlock) -> bool
fn eq(&self, other: &HeaderOnlyBlock) -> bool
self
and other
values to be equal, and is used
by ==
.