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§
Sourcetype Transaction: TransactionResponse
type Transaction: TransactionResponse
Transaction type
Required Methods§
Sourcefn transactions(&self) -> &BlockTransactions<Self::Transaction>
fn transactions(&self) -> &BlockTransactions<Self::Transaction>
Block transactions
Sourcefn transactions_mut(&mut self) -> &mut BlockTransactions<Self::Transaction>
fn transactions_mut(&mut self) -> &mut BlockTransactions<Self::Transaction>
Mutable reference to block transactions
Provided Methods§
Sourcefn other_fields(&self) -> Option<&OtherFields>
fn other_fields(&self) -> Option<&OtherFields>
Returns the other
field from WithOtherFields
type.