Struct ethcore::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.
Methods
impl Header[src] 
impl Headerpub fn new() -> Self[src] 
pub fn new() -> SelfCreate a new, default-valued, header.
pub fn parent_hash(&self) -> &H256[src] 
pub fn parent_hash(&self) -> &H256Get the parent_hash field of the header.
pub fn timestamp(&self) -> u64[src] 
pub fn timestamp(&self) -> u64Get the timestamp field of the header.
pub fn number(&self) -> BlockNumber[src] 
pub fn number(&self) -> BlockNumberGet the number field of the header.
Get the author field of the header.
pub fn extra_data(&self) -> &Bytes[src] 
pub fn extra_data(&self) -> &BytesGet the extra data field of the header.
pub fn state_root(&self) -> &H256[src] 
pub fn state_root(&self) -> &H256Get the state root field of the header.
pub fn receipts_root(&self) -> &H256[src] 
pub fn receipts_root(&self) -> &H256Get the receipts root field of the header.
pub fn log_bloom(&self) -> &Bloom[src] 
pub fn log_bloom(&self) -> &BloomGet the log bloom field of the header.
pub fn transactions_root(&self) -> &H256[src] 
pub fn transactions_root(&self) -> &H256Get the transactions root field of the header.
pub fn uncles_hash(&self) -> &H256[src] 
pub fn uncles_hash(&self) -> &H256Get the uncles hash field of the header.
pub fn gas_used(&self) -> &U256[src] 
pub fn gas_used(&self) -> &U256Get the gas used field of the header.
pub fn gas_limit(&self) -> &U256[src] 
pub fn gas_limit(&self) -> &U256Get the gas limit field of the header.
pub fn difficulty(&self) -> &U256[src] 
pub fn difficulty(&self) -> &U256Get the difficulty field of the header.
pub fn seal(&self) -> &[Bytes][src] 
pub fn seal(&self) -> &[Bytes]Get the seal field of the header.
pub fn decode_seal<'a, T: FromIterator<&'a [u8]>>(
    &'a self
) -> Result<T, DecoderError>[src] 
pub fn decode_seal<'a, T: FromIterator<&'a [u8]>>(
    &'a self
) -> Result<T, DecoderError>Get the seal field with RLP-decoded values as bytes.
pub fn set_parent_hash(&mut self, a: H256)[src] 
pub fn set_parent_hash(&mut self, a: H256)Set the number field of the header.
pub fn set_uncles_hash(&mut self, a: H256)[src] 
pub fn set_uncles_hash(&mut self, a: H256)Set the uncles hash field of the header.
pub fn set_state_root(&mut self, a: H256)[src] 
pub fn set_state_root(&mut self, a: H256)Set the state root field of the header.
pub fn set_transactions_root(&mut self, a: H256)[src] 
pub fn set_transactions_root(&mut self, a: H256)Set the transactions root field of the header.
pub fn set_receipts_root(&mut self, a: H256)[src] 
pub fn set_receipts_root(&mut self, a: H256)Set the receipts root field of the header.
pub fn set_log_bloom(&mut self, a: Bloom)[src] 
pub fn set_log_bloom(&mut self, a: Bloom)Set the log bloom field of the header.
pub fn set_timestamp(&mut self, a: u64)[src] 
pub fn set_timestamp(&mut self, a: u64)Set the timestamp field of the header.
pub fn set_number(&mut self, a: BlockNumber)[src] 
pub fn set_number(&mut self, a: BlockNumber)Set the number field of the header.
Set the author field of the header.
pub fn set_extra_data(&mut self, a: Bytes)[src] 
pub fn set_extra_data(&mut self, a: Bytes)Set the extra data field of the header.
pub fn set_gas_used(&mut self, a: U256)[src] 
pub fn set_gas_used(&mut self, a: U256)Set the gas used field of the header.
pub fn set_gas_limit(&mut self, a: U256)[src] 
pub fn set_gas_limit(&mut self, a: U256)Set the gas limit field of the header.
pub fn set_difficulty(&mut self, a: U256)[src] 
pub fn set_difficulty(&mut self, a: U256)Set the difficulty field of the header.
pub fn set_seal(&mut self, a: Vec<Bytes>)[src] 
pub fn set_seal(&mut self, a: Vec<Bytes>)Set the seal field of the header.
pub fn compute_hash(&mut self) -> H256[src] 
pub fn compute_hash(&mut self) -> H256Get & memoize the hash of this header (keccak of the RLP with seal).
pub fn hash(&self) -> H256[src] 
pub fn hash(&self) -> H256Get the hash of this header (keccak of the RLP with seal).
pub fn bare_hash(&self) -> H256[src] 
pub fn bare_hash(&self) -> H256Get the hash of the header excluding the seal
pub fn encoded(&self) -> Header[src] 
pub fn encoded(&self) -> HeaderEncode the header, getting a type-safe wrapper around the RLP.
Trait Implementations
impl Debug for Header[src] 
impl Debug for Headerfn fmt(&self, f: &mut Formatter) -> Result[src] 
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for Header[src] 
impl Clone for Headerfn clone(&self) -> Header[src] 
fn clone(&self) -> HeaderReturns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src] 
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl Eq for Header[src] 
impl Eq for Headerimpl PartialEq for Header[src] 
impl PartialEq for Headerfn eq(&self, c: &Header) -> bool[src] 
fn eq(&self, c: &Header) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0[src] 
fn ne(&self, other: &Rhs) -> boolThis method tests for !=.
impl Default for Header[src] 
impl Default for Headerimpl Decodable for Header[src] 
impl Decodable for Headerfn decode(r: &Rlp) -> Result<Self, DecoderError>[src] 
fn decode(r: &Rlp) -> Result<Self, DecoderError>Decode a value from RLP bytes
impl Encodable for Header[src] 
impl Encodable for Headerfn rlp_append(&self, s: &mut RlpStream)[src] 
fn rlp_append(&self, s: &mut RlpStream)Append a value to the stream
fn rlp_bytes(&self) -> ElasticArray1024<u8>[src] 
fn rlp_bytes(&self) -> ElasticArray1024<u8>Get rlp-encoded bytes for this instance
impl HeapSizeOf for Header[src] 
impl HeapSizeOf for Headerfn heap_size_of_children(&self) -> usize[src] 
fn heap_size_of_children(&self) -> usizeMeasure the size of any heap-allocated structures that hang off this value, but not the space taken up by the value itself (i.e. what size_of:: measures, more or less); that space is handled by the implementation of HeapSizeOf for Box below. Read more
impl Header for Header[src] 
impl Header for Headerfn bare_hash(&self) -> H256[src] 
fn bare_hash(&self) -> H256Cryptographic hash of the header, excluding the seal.
fn hash(&self) -> H256[src] 
fn hash(&self) -> H256Cryptographic hash of the header, including the seal.
fn seal(&self) -> &[Vec<u8>][src] 
fn seal(&self) -> &[Vec<u8>]Get a reference to the seal fields.
The author of the header.
fn number(&self) -> BlockNumber[src] 
fn number(&self) -> BlockNumberThe number of the header.
impl ScoredHeader for Header[src] 
impl ScoredHeader for Headertype Value = U256
fn score(&self) -> &U256[src] 
fn score(&self) -> &U256Get the score of this header.
fn set_score(&mut self, score: U256)[src] 
fn set_score(&mut self, score: U256)Set the score of this header.
impl BlockLike for Header[src] 
impl BlockLike for Headerfn hash(&self) -> H256[src] 
fn hash(&self) -> H256Get the hash of this item.
fn parent_hash(&self) -> H256[src] 
fn parent_hash(&self) -> H256Get the hash of this item's parent.
fn difficulty(&self) -> U256[src] 
fn difficulty(&self) -> U256Get the difficulty of this item.