alloy_network

Trait BlockResponse

Source
pub trait BlockResponse {
    type Header;
    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

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§