Struct common_types::encoded::Body[][src]

pub struct Body(_);

Owning block body view.

Implementations

impl Body[src]

pub fn new(raw: Vec<u8>) -> Self[src]

Create a new owning block body view. The raw bytes passed in must be an rlp-encoded block body.

pub fn view(&self) -> BodyView<'_>[src]

Get a borrowed view of the data within.

pub fn decode(&self) -> (Vec<UnverifiedTransaction>, Vec<FullHeader>)[src]

Fully decode this block body.

pub fn rlp(&self) -> Rlp<'_>[src]

Get the RLP of this block body.

pub fn into_inner(self) -> Vec<u8>[src]

Consume the view and return the raw bytes.

impl Body[src]

pub fn transactions_rlp(&self) -> Rlp<'_>[src]

Get raw rlp of transactions

pub fn transactions(&self) -> Vec<UnverifiedTransaction>[src]

Get a vector of all transactions.

pub fn transactions_count(&self) -> usize[src]

Number of transactions in the block.

pub fn transaction_views(&self) -> Vec<TransactionView<'_>>[src]

A view over each transaction in the block.

pub fn transaction_hashes(&self) -> Vec<H256>[src]

The hash of each transaction in the block.

pub fn uncles_rlp(&self) -> Rlp<'_>[src]

Get raw rlp of uncle headers

pub fn uncles(&self) -> Vec<FullHeader>[src]

Decode uncle headers.

pub fn uncles_count(&self) -> usize[src]

Number of uncles.

pub fn uncle_views(&self) -> Vec<HeaderView<'_>>[src]

Borrowed view over each uncle.

pub fn uncle_hashes(&self) -> Vec<H256>[src]

Hash of each uncle.

Trait Implementations

impl Clone for Body[src]

impl Debug for Body[src]

impl Eq for Body[src]

impl MallocSizeOf for Body[src]

impl PartialEq<Body> for Body[src]

impl StructuralEq for Body[src]

impl StructuralPartialEq for Body[src]

Auto Trait Implementations

impl RefUnwindSafe for Body

impl Send for Body

impl Sync for Body

impl Unpin for Body

impl UnwindSafe for Body

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> MallocSizeOfExt for T where
    T: MallocSizeOf
[src]

impl<T> MaybeDebug for T where
    T: Debug

impl<T> MaybeDebug for T where
    T: Debug

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,