pub struct HeaderV3 {Show 22 fields
pub nonce: u64,
pub prev_hash: Bytes,
pub prev_rand_seed: Bytes,
pub rand_seed: Bytes,
pub shard_id: u32,
pub timestamp_ms: u64,
pub round: u64,
pub epoch: u32,
pub block_body_type: i32,
pub leader_signature: Bytes,
pub mini_block_headers: Vec<MiniBlockHeader>,
pub peer_changes: Vec<PeerChange>,
pub meta_block_hashes: Vec<Bytes>,
pub tx_count: u32,
pub epoch_start_meta_hash: Bytes,
pub receipts_hash: Bytes,
pub chain_id: Bytes,
pub software_version: Bytes,
pub reserved: Bytes,
pub gas_limit: u32,
pub last_execution_result: Option<ExecutionResultInfo>,
pub execution_results: Vec<ExecutionResult>,
}Expand description
HeaderV3 defines the structure of the header V3
Fields§
§nonce: u64§prev_hash: Bytes§prev_rand_seed: Bytes§rand_seed: Bytes§shard_id: u32§timestamp_ms: u64§round: u64§epoch: u32§block_body_type: i32§leader_signature: Bytes§mini_block_headers: Vec<MiniBlockHeader>§peer_changes: Vec<PeerChange>§meta_block_hashes: Vec<Bytes>§tx_count: u32§epoch_start_meta_hash: Bytes§receipts_hash: Bytes§chain_id: Bytes§software_version: Bytes§reserved: Bytes§gas_limit: u32§last_execution_result: Option<ExecutionResultInfo>§execution_results: Vec<ExecutionResult>Implementations§
Source§impl HeaderV3
impl HeaderV3
Sourcepub fn block_body_type(&self) -> Type
pub fn block_body_type(&self) -> Type
Returns the enum value of block_body_type, or the default if the field is set to an invalid enum value.
Sourcepub fn set_block_body_type(&mut self, value: Type)
pub fn set_block_body_type(&mut self, value: Type)
Sets block_body_type to the provided enum value.
Trait Implementations§
Source§impl Message for HeaderV3
impl Message for HeaderV3
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message to a buffer. Read more
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Encodes the message to a newly allocated buffer.
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Encodes the message with a length-delimiter to a buffer. Read more
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,
Encodes the message with a length-delimiter to a newly allocated buffer.
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes an instance of the message from a buffer. Read more
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes an instance of the message from a buffer, and merges it into
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self.impl StructuralPartialEq for HeaderV3
Auto Trait Implementations§
impl !Freeze for HeaderV3
impl RefUnwindSafe for HeaderV3
impl Send for HeaderV3
impl Sync for HeaderV3
impl Unpin for HeaderV3
impl UnsafeUnpin for HeaderV3
impl UnwindSafe for HeaderV3
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request