Struct ethcore::encoded::Block  [−][src]
pub struct Block(_);
Owning block view.
Methods
impl Block[src] 
impl Blockpub fn new(raw: Vec<u8>) -> Self[src] 
pub fn new(raw: Vec<u8>) -> SelfCreate a new owning block view. The raw bytes passed in must be an rlp-encoded block.
pub fn new_from_header_and_body(header: &HeaderView, body: &BodyView) -> Self[src] 
pub fn new_from_header_and_body(header: &HeaderView, body: &BodyView) -> SelfCreate a new owning block view by concatenating the encoded header and body
pub fn view(&self) -> BlockView[src] 
pub fn view(&self) -> BlockViewGet a borrowed view of the whole block.
pub fn header_view(&self) -> HeaderView[src] 
pub fn header_view(&self) -> HeaderViewGet a borrowed view of the block header.
pub fn decode(&self) -> Result<FullBlock, DecoderError>[src] 
pub fn decode(&self) -> Result<FullBlock, DecoderError>Decode to a full block.
pub fn decode_header(&self) -> FullHeader[src] 
pub fn decode_header(&self) -> FullHeaderDecode the header.
pub fn header(&self) -> Header[src] 
pub fn header(&self) -> HeaderClone the encoded header.
pub fn rlp(&self) -> Rlp[src] 
pub fn rlp(&self) -> RlpGet the rlp of this block.
pub fn into_inner(self) -> Vec<u8>[src] 
pub fn into_inner(self) -> Vec<u8>Consume the view and return the raw bytes.
impl Block[src] 
impl Blockpub fn hash(&self) -> H256[src] 
pub fn hash(&self) -> H256Returns the header hash.
pub fn parent_hash(&self) -> H256[src] 
pub fn parent_hash(&self) -> H256Returns the parent hash.
pub fn uncles_hash(&self) -> H256[src] 
pub fn uncles_hash(&self) -> H256Returns the uncles hash.
Returns the author.
pub fn state_root(&self) -> H256[src] 
pub fn state_root(&self) -> H256Returns the state root.
pub fn transactions_root(&self) -> H256[src] 
pub fn transactions_root(&self) -> H256Returns the transaction trie root.
pub fn receipts_root(&self) -> H256[src] 
pub fn receipts_root(&self) -> H256Returns the receipts trie root
pub fn log_bloom(&self) -> Bloom[src] 
pub fn log_bloom(&self) -> BloomReturns the block log bloom
pub fn difficulty(&self) -> U256[src] 
pub fn difficulty(&self) -> U256Difficulty of this block
pub fn number(&self) -> BlockNumber[src] 
pub fn number(&self) -> BlockNumberNumber of this block.
pub fn timestamp(&self) -> u64[src] 
pub fn timestamp(&self) -> u64Time this block was produced.
pub fn gas_limit(&self) -> U256[src] 
pub fn gas_limit(&self) -> U256Gas limit of this block.
pub fn gas_used(&self) -> U256[src] 
pub fn gas_used(&self) -> U256Total 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.
impl Block[src] 
impl Blockpub fn transactions(&self) -> Vec<UnverifiedTransaction>[src] 
pub fn transactions(&self) -> Vec<UnverifiedTransaction>Get a vector of all transactions.
pub fn transactions_count(&self) -> usize[src] 
pub fn transactions_count(&self) -> usizeNumber of transactions in the block.
pub fn transaction_views(&self) -> Vec<TransactionView>[src] 
pub fn transaction_views(&self) -> Vec<TransactionView>A view over each transaction in the block.
pub fn transaction_hashes(&self) -> Vec<H256>[src] 
pub fn transaction_hashes(&self) -> Vec<H256>The hash of each transaction in the block.
pub fn uncles(&self) -> Vec<FullHeader>[src] 
pub fn uncles(&self) -> Vec<FullHeader>Decode uncle headers.
pub fn uncles_count(&self) -> usize[src] 
pub fn uncles_count(&self) -> usizeNumber of uncles.
pub fn uncle_views(&self) -> Vec<HeaderView>[src] 
pub fn uncle_views(&self) -> Vec<HeaderView>Borrowed view over each uncle.
pub fn uncle_hashes(&self) -> Vec<H256>[src] 
pub fn uncle_hashes(&self) -> Vec<H256>Hash of each uncle.
Trait Implementations
impl Debug for Block[src] 
impl Debug for Blockfn 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 Block[src] 
impl Clone for Blockfn clone(&self) -> Block[src] 
fn clone(&self) -> BlockReturns 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 Block[src] 
impl PartialEq for Blockfn eq(&self, other: &Block) -> bool[src] 
fn eq(&self, other: &Block) -> boolThis method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Block) -> bool[src] 
fn ne(&self, other: &Block) -> boolThis method tests for !=.
impl Eq for Block[src] 
impl Eq for Blockimpl HeapSizeOf for Block[src] 
impl HeapSizeOf for Blockfn 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