Struct ethcore::encoded::Header
[−]
[src]
pub struct Header(_);
Owning header view.
Methods
impl Header
[src]
impl Header
pub fn new(encoded: Vec<u8>) -> Self
[src]
pub fn new(encoded: Vec<u8>) -> Self
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]
pub fn decode(&self) -> Result<FullHeader, DecoderError>
Upgrade this encoded view to a fully owned Header
object.
pub fn view(&self) -> HeaderView
[src]
pub fn view(&self) -> HeaderView
Get a borrowed header view onto the data.
pub fn rlp(&self) -> Rlp
[src]
pub fn rlp(&self) -> Rlp
Get the rlp of the header.
pub fn into_inner(self) -> Vec<u8>
[src]
pub fn into_inner(self) -> Vec<u8>
Consume the view and return the raw bytes.
impl Header
[src]
impl Header
pub fn hash(&self) -> H256
[src]
pub fn hash(&self) -> H256
Returns the header hash.
pub fn parent_hash(&self) -> H256
[src]
pub fn parent_hash(&self) -> H256
Returns the parent hash.
pub fn uncles_hash(&self) -> H256
[src]
pub fn uncles_hash(&self) -> H256
Returns the uncles hash.
Returns the author.
pub fn state_root(&self) -> H256
[src]
pub fn state_root(&self) -> H256
Returns the state root.
pub fn transactions_root(&self) -> H256
[src]
pub fn transactions_root(&self) -> H256
Returns the transaction trie root.
pub fn receipts_root(&self) -> H256
[src]
pub fn receipts_root(&self) -> H256
Returns the receipts trie root
pub fn log_bloom(&self) -> Bloom
[src]
pub fn log_bloom(&self) -> Bloom
Returns the block log bloom
pub fn difficulty(&self) -> U256
[src]
pub fn difficulty(&self) -> U256
Difficulty of this block
pub fn number(&self) -> BlockNumber
[src]
pub fn number(&self) -> BlockNumber
Number of this block.
pub fn timestamp(&self) -> u64
[src]
pub fn timestamp(&self) -> u64
Time this block was produced.
pub fn gas_limit(&self) -> U256
[src]
pub fn gas_limit(&self) -> U256
Gas limit of this block.
pub fn gas_used(&self) -> U256
[src]
pub fn gas_used(&self) -> U256
Total gas used in this block.
pub fn extra_data(&self) -> Vec<u8>
[src]
pub fn extra_data(&self) -> Vec<u8>
Block extra data.
pub fn seal(&self) -> Vec<Vec<u8>>
[src]
pub fn seal(&self) -> Vec<Vec<u8>>
Engine-specific seal fields.
Trait Implementations
impl Debug for Header
[src]
impl Debug for Header
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for Header
[src]
impl Clone for Header
fn clone(&self) -> Header
[src]
fn clone(&self) -> Header
Returns 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 PartialEq for Header
[src]
impl PartialEq for Header
fn eq(&self, __arg_0: &Header) -> bool
[src]
fn eq(&self, __arg_0: &Header) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Header) -> bool
[src]
fn ne(&self, __arg_0: &Header) -> bool
This method tests for !=
.
impl Eq for Header
[src]
impl Eq for Header
impl HeapSizeOf for Header
[src]
impl HeapSizeOf for Header
fn heap_size_of_children(&self) -> usize
[src]
fn heap_size_of_children(&self) -> usize
Measure 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