alloy_network

Trait BlockResponse

source
pub trait BlockResponse {
    type Header: HeaderResponse;
    type Transaction: TransactionResponse;

    // Required methods
    fn header(&self) -> &Self::Header;
    fn transactions(&self) -> &BlockTransactions<Self::Transaction>;
    fn transactions_mut(&mut self) -> &mut BlockTransactions<Self::Transaction>;

    // Provided method
    fn other_fields(&self) -> Option<&OtherFields> { ... }
}
Expand description

Block JSON-RPC response.

Required Associated Types§

source

type Header: HeaderResponse

Header type

source

type Transaction: TransactionResponse

Transaction type

Required Methods§

source

fn header(&self) -> &Self::Header

Block header

source

fn transactions(&self) -> &BlockTransactions<Self::Transaction>

Block transactions

source

fn transactions_mut(&mut self) -> &mut BlockTransactions<Self::Transaction>

Mutable reference to block transactions

Provided Methods§

source

fn other_fields(&self) -> Option<&OtherFields>

Returns the other field from WithOtherFields type.

Implementations on Foreign Types§

source§

impl<T> BlockResponse for WithOtherFields<T>
where T: BlockResponse,

source§

impl<T, H> BlockResponse for Block<T, H>

Implementors§