ReceiptConverter

Trait ReceiptConverter 

Source
pub trait ReceiptConverter<N: NodePrimitives>: Debug + 'static {
    type RpcReceipt;
    type Error;

    // Required method
    fn convert_receipts(
        &self,
        receipts: Vec<ConvertReceiptInput<'_, N>>,
    ) -> Result<Vec<Self::RpcReceipt>, Self::Error>;

    // Provided method
    fn convert_receipts_with_block(
        &self,
        receipts: Vec<ConvertReceiptInput<'_, N>>,
        _block: &SealedBlock<N::Block>,
    ) -> Result<Vec<Self::RpcReceipt>, Self::Error> { ... }
}
Expand description

A type that knows how to convert primitive receipts to RPC representations.

Required Associated Types§

Source

type RpcReceipt

RPC representation.

Source

type Error

Error that may occur during conversion.

Required Methods§

Source

fn convert_receipts( &self, receipts: Vec<ConvertReceiptInput<'_, N>>, ) -> Result<Vec<Self::RpcReceipt>, Self::Error>

Converts a set of primitive receipts to RPC representations. It is guaranteed that all receipts are from the same block.

Provided Methods§

Source

fn convert_receipts_with_block( &self, receipts: Vec<ConvertReceiptInput<'_, N>>, _block: &SealedBlock<N::Block>, ) -> Result<Vec<Self::RpcReceipt>, Self::Error>

Converts a set of primitive receipts to RPC representations. It is guaranteed that all receipts are from block.

Implementors§