Struct common_types::header::Header[][src]

pub struct Header { /* fields omitted */ }

A block header.

Reflects the specific RLP fields of a block in the chain with additional room for the seal which is non-specific.

Doesn’t do all that much on its own.

Implementations

impl Header[src]

pub fn new() -> Self[src]

Create a new, default-valued, header.

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

Get the parent_hash field of the header.

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

Get the timestamp field of the header.

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

Get the number field of the header.

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

Get the author field of the header.

pub fn extra_data(&self) -> &Bytes[src]

Get the extra data field of the header.

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

Get the state root field of the header.

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

Get the receipts root field of the header.

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

Get the log bloom field of the header.

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

Get the transactions root field of the header.

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

Get the uncles hash field of the header.

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

Get the gas used field of the header.

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

Get the gas limit field of the header.

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

Get the difficulty field of the header.

pub fn seal(&self) -> &[Bytes][src]

Get the seal field of the header.

pub fn decode_seal<'a, T: FromIterator<&'a [u8]>>(
    &'a self
) -> Result<T, DecoderError>
[src]

Get the seal field with RLP-decoded values as bytes.

pub fn set_parent_hash(&mut self, a: H256)[src]

Set the number field of the header.

pub fn set_uncles_hash(&mut self, a: H256)[src]

Set the uncles hash field of the header.

pub fn set_state_root(&mut self, a: H256)[src]

Set the state root field of the header.

pub fn set_transactions_root(&mut self, a: H256)[src]

Set the transactions root field of the header.

pub fn set_receipts_root(&mut self, a: H256)[src]

Set the receipts root field of the header.

pub fn set_log_bloom(&mut self, a: Bloom)[src]

Set the log bloom field of the header.

pub fn set_timestamp(&mut self, a: u64)[src]

Set the timestamp field of the header.

pub fn set_number(&mut self, a: BlockNumber)[src]

Set the number field of the header.

pub fn set_author(&mut self, a: Address)[src]

Set the author field of the header.

pub fn set_extra_data(&mut self, a: Bytes)[src]

Set the extra data field of the header.

pub fn set_gas_used(&mut self, a: U256)[src]

Set the gas used field of the header.

pub fn set_gas_limit(&mut self, a: U256)[src]

Set the gas limit field of the header.

pub fn set_difficulty(&mut self, a: U256)[src]

Set the difficulty field of the header.

pub fn set_seal(&mut self, a: Vec<Bytes>)[src]

Set the seal field of the header.

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

Get & memoize the hash of this header (keccak of the RLP with seal).

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

Get the hash of this header (keccak of the RLP with seal).

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

Get the hash of the header excluding the seal

pub fn encoded(&self) -> Header[src]

Encode the header, getting a type-safe wrapper around the RLP.

Trait Implementations

impl Clone for Header[src]

impl Debug for Header[src]

impl Decodable for Header[src]

impl Default for Header[src]

impl Encodable for Header[src]

impl Eq for Header[src]

impl MallocSizeOf for Header[src]

impl PartialEq<Header> for Header[src]

impl StructuralEq 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>,