Struct ethcore::encoded::Block
[−]
[src]
pub struct Block(_);
Owning block view.
Methods
impl Block
[src]
impl Block
pub fn new(raw: Vec<u8>) -> Self
[src]
pub fn new(raw: Vec<u8>) -> Self
Create 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) -> Self
Create a new owning block view by concatenating the encoded header and body
pub fn view(&self) -> BlockView
[src]
pub fn view(&self) -> BlockView
Get a borrowed view of the whole block.
pub fn header_view(&self) -> HeaderView
[src]
pub fn header_view(&self) -> HeaderView
Get 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) -> FullHeader
Decode the header.
pub fn header(&self) -> Header
[src]
pub fn header(&self) -> Header
Clone the encoded header.
pub fn rlp(&self) -> Rlp
[src]
pub fn rlp(&self) -> Rlp
Get 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 Block
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.
impl Block
[src]
impl Block
pub 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) -> usize
Number 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) -> usize
Number 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 Block
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 Block
[src]
impl Clone for Block
fn clone(&self) -> Block
[src]
fn clone(&self) -> Block
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 Block
[src]
impl PartialEq for Block
fn eq(&self, __arg_0: &Block) -> bool
[src]
fn eq(&self, __arg_0: &Block) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Block) -> bool
[src]
fn ne(&self, __arg_0: &Block) -> bool
This method tests for !=
.
impl Eq for Block
[src]
impl Eq for Block
impl HeapSizeOf for Block
[src]
impl HeapSizeOf for Block
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