Struct common_types::views::BlockView [−][src]
View onto block rlp.
Implementations
impl<'a> BlockView<'a>[src]
pub fn new(rlp: ViewRlp<'a>) -> BlockView<'a>[src]
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 common_types as types; use types::views::{BlockView}; fn main() { let bytes : &[u8] = &[]; let block_view = view!(BlockView, bytes); }
pub fn hash(&self) -> H256[src]
Block header hash.
pub fn rlp(&self) -> &ViewRlp<'a>[src]
Return reference to underlaying rlp.
pub fn header(&self) -> Header[src]
Create new Header object from header rlp.
pub fn header_rlp(&self) -> ViewRlp<'a>[src]
Return header rlp.
pub fn header_view(&self) -> HeaderView<'a>[src]
Create new header view obto block head rlp.
pub fn transactions(&self) -> Vec<UnverifiedTransaction>[src]
Return List of transactions in given block.
pub fn localized_transactions(&self) -> Vec<LocalizedTransaction>[src]
Return List of transactions with additional localization info.
pub fn transactions_rlp(&self) -> ViewRlp<'a>[src]
Return the raw rlp for the transactions in the given block.
pub fn transactions_count(&self) -> usize[src]
Return number of transactions in given block, without deserializing them.
pub fn transaction_views(&self) -> Vec<TransactionView<'a>>[src]
Return List of transactions in given block.
pub fn transaction_hashes(&self) -> Vec<H256>[src]
Return transaction hashes.
pub fn transaction_at(&self, index: usize) -> Option<UnverifiedTransaction>[src]
Returns transaction at given index without deserializing unnecessary data.
pub fn localized_transaction_at(
&self,
index: usize
) -> Option<LocalizedTransaction>[src]
&self,
index: usize
) -> Option<LocalizedTransaction>
Returns localized transaction at given index.
pub fn uncles_rlp(&self) -> ViewRlp<'a>[src]
Returns raw rlp for the uncles in the given block
pub fn uncles(&self) -> Vec<Header>[src]
Return list of uncles of given block.
pub fn uncles_count(&self) -> usize[src]
Return number of uncles in given block, without deserializing them.
pub fn uncle_views(&self) -> Vec<HeaderView<'a>>[src]
Return List of transactions in given block.
pub fn uncle_hashes(&self) -> Vec<H256>[src]
Return list of uncle hashes of given block.
pub fn uncle_at(&self, index: usize) -> Option<Header>[src]
Return nth uncle.
pub fn uncle_rlp_at(&self, index: usize) -> Option<Bytes>[src]
Return nth uncle rlp.
Auto Trait Implementations
impl<'a> !RefUnwindSafe for BlockView<'a>
impl<'a> Send for BlockView<'a>
impl<'a> !Sync for BlockView<'a>
impl<'a> Unpin for BlockView<'a>
impl<'a> UnwindSafe for BlockView<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,