pub trait ReceiptConverter<N>: Debug + 'staticwhere
N: NodePrimitives,{
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 as NodePrimitives>::Block>,
) -> Result<Vec<Self::RpcReceipt>, Self::Error> { ... }
}Available on crate feature
rpc only.Expand description
A type that knows how to convert primitive receipts to RPC representations.
Required Associated Types§
Sourcetype RpcReceipt
type RpcReceipt
RPC representation.
Required Methods§
Sourcefn convert_receipts(
&self,
receipts: Vec<ConvertReceiptInput<'_, N>>,
) -> Result<Vec<Self::RpcReceipt>, Self::Error>
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§
Sourcefn convert_receipts_with_block(
&self,
receipts: Vec<ConvertReceiptInput<'_, N>>,
_block: &SealedBlock<<N as NodePrimitives>::Block>,
) -> Result<Vec<Self::RpcReceipt>, Self::Error>
fn convert_receipts_with_block( &self, receipts: Vec<ConvertReceiptInput<'_, N>>, _block: &SealedBlock<<N as NodePrimitives>::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.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".