Struct ethcore::views::BlockView
[−]
[src]
pub struct BlockView<'a> { /* fields omitted */ }
View onto block rlp.
Methods
impl<'a> BlockView<'a>
[src]
impl<'a> BlockView<'a>
pub fn new(rlp: ViewRlp<'a>) -> BlockView<'a>
[src]
pub fn new(rlp: ViewRlp<'a>) -> BlockView<'a>
Creates new view onto block from rlp.
Use the view!
macro to create this view in order to capture debugging info.
Example
#[macro_use] extern crate ethcore; use ethcore::views::{BlockView}; fn main() { let bytes : &[u8] = &[]; let block_view = view!(BlockView, bytes); }
pub fn hash(&self) -> H256
[src]
pub fn hash(&self) -> H256
Block header hash.
pub fn rlp(&self) -> &ViewRlp<'a>
[src]
pub fn rlp(&self) -> &ViewRlp<'a>
Return reference to underlaying rlp.
pub fn header(&self) -> Header
[src]
pub fn header(&self) -> Header
Create new Header object from header rlp.
pub fn header_rlp(&self) -> ViewRlp<'a>
[src]
pub fn header_rlp(&self) -> ViewRlp<'a>
Return header rlp.
pub fn header_view(&self) -> HeaderView<'a>
[src]
pub fn header_view(&self) -> HeaderView<'a>
Create new header view obto block head rlp.
pub fn transactions(&self) -> Vec<UnverifiedTransaction>
[src]
pub fn transactions(&self) -> Vec<UnverifiedTransaction>
Return List of transactions in given block.
pub fn localized_transactions(&self) -> Vec<LocalizedTransaction>
[src]
pub fn localized_transactions(&self) -> Vec<LocalizedTransaction>
Return List of transactions with additional localization info.
pub fn transactions_rlp(&self) -> ViewRlp<'a>
[src]
pub fn transactions_rlp(&self) -> ViewRlp<'a>
Return the raw rlp for the transactions in the given block.
pub fn transactions_count(&self) -> usize
[src]
pub fn transactions_count(&self) -> usize
Return number of transactions in given block, without deserializing them.
pub fn transaction_views(&self) -> Vec<TransactionView<'a>>
[src]
pub fn transaction_views(&self) -> Vec<TransactionView<'a>>
Return List of transactions in given block.
pub fn transaction_hashes(&self) -> Vec<H256>
[src]
pub fn transaction_hashes(&self) -> Vec<H256>
Return transaction hashes.
pub fn transaction_at(&self, index: usize) -> Option<UnverifiedTransaction>
[src]
pub fn transaction_at(&self, index: usize) -> Option<UnverifiedTransaction>
Returns transaction at given index without deserializing unnecessary data.
pub fn localized_transaction_at(
&self,
index: usize
) -> Option<LocalizedTransaction>
[src]
pub fn localized_transaction_at(
&self,
index: usize
) -> Option<LocalizedTransaction>
Returns localized transaction at given index.
pub fn uncles_rlp(&self) -> ViewRlp<'a>
[src]
pub fn uncles_rlp(&self) -> ViewRlp<'a>
Returns raw rlp for the uncles in the given block
pub fn uncles(&self) -> Vec<Header>
[src]
pub fn uncles(&self) -> Vec<Header>
Return list of uncles of given block.
pub fn uncles_count(&self) -> usize
[src]
pub fn uncles_count(&self) -> usize
Return number of uncles in given block, without deserializing them.
pub fn uncle_views(&self) -> Vec<HeaderView<'a>>
[src]
pub fn uncle_views(&self) -> Vec<HeaderView<'a>>
Return List of transactions in given block.
pub fn uncle_hashes(&self) -> Vec<H256>
[src]
pub fn uncle_hashes(&self) -> Vec<H256>
Return list of uncle hashes of given block.
pub fn uncle_at(&self, index: usize) -> Option<Header>
[src]
pub fn uncle_at(&self, index: usize) -> Option<Header>
Return nth uncle.
pub fn uncle_rlp_at(&self, index: usize) -> Option<Bytes>
[src]
pub fn uncle_rlp_at(&self, index: usize) -> Option<Bytes>
Return nth uncle rlp.