pub trait IntoRpcTx<T> {
type TxInfo;
type Err: Error;
// Required method
fn into_rpc_tx(
self,
signer: Address,
tx_info: Self::TxInfo,
) -> Result<T, Self::Err>;
}Expand description
Converts self into T. The opposite of FromConsensusTx.
Should create an RPC transaction response object based on a consensus transaction, its signer
Address and an additional context IntoRpcTx::TxInfo.
Avoid implementing IntoRpcTx and use FromConsensusTx instead. Implementing it
automatically provides an implementation of IntoRpcTx thanks to the blanket implementation
in this crate.
Prefer using IntoRpcTx over FromConsensusTx when specifying trait bounds on a generic
function to ensure that types that only implement IntoRpcTx can be used as well.
Required Associated Types§
Sourcetype TxInfo
type TxInfo
An additional context, usually TransactionInfo in a wrapper that carries some
implementation specific extra information.