pub struct Header {Show 14 fields
pub version: Option<Consensus>,
pub chain_id: String,
pub height: i64,
pub time: Option<Timestamp>,
pub last_block_id: Option<BlockId>,
pub last_commit_hash: Vec<u8, Global>,
pub data_hash: Vec<u8, Global>,
pub validators_hash: Vec<u8, Global>,
pub next_validators_hash: Vec<u8, Global>,
pub consensus_hash: Vec<u8, Global>,
pub app_hash: Vec<u8, Global>,
pub last_results_hash: Vec<u8, Global>,
pub evidence_hash: Vec<u8, Global>,
pub proposer_address: Vec<u8, Global>,
}
Expand description
Header defines the structure of a Tendermint block header.
Fields
version: Option<Consensus>
basic block info
chain_id: String
height: i64
time: Option<Timestamp>
last_block_id: Option<BlockId>
prev block info
last_commit_hash: Vec<u8, Global>
hashes of block data
commit from validators from the last block
data_hash: Vec<u8, Global>
transactions
validators_hash: Vec<u8, Global>
hashes from the app output from the prev block
validators for the current block
next_validators_hash: Vec<u8, Global>
validators for the next block
consensus_hash: Vec<u8, Global>
consensus params for current block
app_hash: Vec<u8, Global>
state after txs from the previous block
last_results_hash: Vec<u8, Global>
root hash of all results from the txs from the previous block
evidence_hash: Vec<u8, Global>
consensus info
evidence included in the block
proposer_address: Vec<u8, Global>
original proposer of the block
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Header
impl<'de> Deserialize<'de> for Header
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<Header, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<Header, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Message for Header
impl Message for Header
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
sourcefn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Encodes the message to a buffer. Read more
sourcefn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Encodes the message to a newly allocated buffer.
sourcefn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>where
B: BufMut,
Encodes the message with a length-delimiter to a buffer. Read more
sourcefn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A>where
A: Allocator,
A: Allocator,
Encodes the message with a length-delimiter to a newly allocated buffer.
sourcefn 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,
Decodes an instance of the message from a buffer. Read more
sourcefn 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,
Decodes a length-delimited instance of the message from the buffer.
sourcefn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into
self
. Read moresourcefn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>where
B: Buf,
Decodes a length-delimited instance of the message from buffer, and
merges it into
self
. Read moresourceimpl Serialize for Header
impl Serialize for Header
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for Header
Auto Trait Implementations
impl RefUnwindSafe for Header
impl Send for Header
impl Sync for Header
impl Unpin for Header
impl UnwindSafe for Header
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more