Struct common_types::encoded::Block[][src]

pub struct Block(_);

Owning block view.

Implementations

impl Block[src]

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

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]

Create a new owning block view by concatenating the encoded header and body

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

Get a borrowed view of the whole block.

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

Get a borrowed view of the block header.

pub fn decode(&self) -> Result<FullBlock, DecoderError>[src]

Decode to a full block.

pub fn decode_header(&self) -> FullHeader[src]

Decode the header.

pub fn header(&self) -> Header[src]

Clone the encoded header.

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

Get the rlp of this block.

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

Consume the view and return the raw bytes.

pub fn raw(&self) -> &[u8][src]

Returns the reference to slice of bytes

impl Block[src]

pub fn hash(&self) -> H256[src]

Returns the header hash.

pub fn parent_hash(&self) -> H256[src]

Returns the parent hash.

pub fn uncles_hash(&self) -> H256[src]

Returns the uncles hash.

pub fn author(&self) -> Address[src]

Returns the author.

pub fn state_root(&self) -> H256[src]

Returns the state root.

pub fn transactions_root(&self) -> H256[src]

Returns the transaction trie root.

pub fn receipts_root(&self) -> H256[src]

Returns the receipts trie root

pub fn log_bloom(&self) -> Bloom[src]

Returns the block log bloom

pub fn difficulty(&self) -> U256[src]

Difficulty of this block

pub fn number(&self) -> BlockNumber[src]

Number of this block.

pub fn timestamp(&self) -> u64[src]

Time this block was produced.

pub fn gas_limit(&self) -> U256[src]

Gas limit of this block.

pub fn gas_used(&self) -> U256[src]

Total gas used in this block.

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

Block extra data.

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

Engine-specific seal fields.

impl Block[src]

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(&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 Block[src]

impl Debug for Block[src]

impl Eq for Block[src]

impl MallocSizeOf for Block[src]

impl PartialEq<Block> for Block[src]

impl StructuralEq for Block[src]

impl StructuralPartialEq for Block[src]

Auto Trait Implementations

impl RefUnwindSafe for Block

impl Send for Block

impl Sync for Block

impl Unpin for Block

impl UnwindSafe for Block

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>,