Struct common_types::encoded::Header[][src]

pub struct Header(_);

Owning header view.

Implementations

impl Header[src]

pub fn new(encoded: Vec<u8>) -> Self[src]

Create a new owning header view. Expects the data to be an RLP-encoded header – any other case will likely lead to panics further down the line.

pub fn decode(&self) -> Result<FullHeader, DecoderError>[src]

Upgrade this encoded view to a fully owned Header object.

pub fn view(&self) -> HeaderView<'_>[src]

Get a borrowed header view onto the data.

pub fn rlp(&self) -> Rlp<'_>[src]

Get the rlp of the header.

pub fn into_inner(self) -> Vec<u8>[src]

Consume the view and return the raw bytes.

impl Header[src]

pub fn hash(&self) -> H256[src]

Returns the header hash.

pub fn parent_hash(&self) -> H256[src]

Returns the parent hash.

pub fn uncles_hash(&self) -> H256[src]

Returns the uncles hash.

pub fn author(&self) -> Address[src]

Returns the author.

pub fn state_root(&self) -> H256[src]

Returns the state root.

pub fn transactions_root(&self) -> H256[src]

Returns the transaction trie root.

pub fn receipts_root(&self) -> H256[src]

Returns the receipts trie root

pub fn log_bloom(&self) -> Bloom[src]

Returns the block log bloom

pub fn difficulty(&self) -> U256[src]

Difficulty of this block

pub fn number(&self) -> BlockNumber[src]

Number of this block.

pub fn timestamp(&self) -> u64[src]

Time this block was produced.

pub fn gas_limit(&self) -> U256[src]

Gas limit of this block.

pub fn gas_used(&self) -> U256[src]

Total gas used in this block.

pub fn extra_data(&self) -> Vec<u8>[src]

Block extra data.

pub fn seal(&self) -> Vec<Vec<u8>>[src]

Engine-specific seal fields.

Trait Implementations

impl Clone for Header[src]

impl Debug for Header[src]

impl Eq for Header[src]

impl LowerHex for Header[src]

impl MallocSizeOf for Header[src]

impl PartialEq<Header> for Header[src]

impl StructuralEq for Header[src]

impl StructuralPartialEq for Header[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MallocSizeOfExt for T where
    T: MallocSizeOf
[src]

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,