pub struct HeaderView<'a> { /* private fields */ }
Expand description

View onto block header rlp.

Implementations

Creates a new Header view from valid ViewRlp Use the view! macro to create this view in order to capture debugging info.

Example
#[macro_use]
extern crate common_types as types;

use types::views::{HeaderView};

fn main() {
let bytes : &[u8] = &[];
let tx_view = view!(HeaderView, bytes);
}

Returns header hash.

Returns raw rlp.

Returns parent hash.

Returns uncles hash.

Returns author.

Returns state root.

Returns transactions root.

Returns block receipts root.

Returns block log bloom.

Returns block difficulty.

Returns block number.

Returns block gas limit.

Returns block gas used.

Returns timestamp.

Returns block extra data.

Returns a vector of post-RLP-encoded seal fields. If eip1559 is true, seal contains also base_fee_per_gas. Otherwise, it contains only seal fields.

Returns block base fee. Should be called only for EIP1559 headers. If called for non EIP1559 header, returns garbage

Returns a vector of seal fields (RLP-decoded). If eip1559 is true, seal contains also base_fee_per_gas. Otherwise, it contains only seal fields.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.