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§
sourcetype Header: HeaderResponse
type Header: HeaderResponse
Header type
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.