pub trait PreparedTransaction: Sized {
type Raw: RawTransactionPayload;
// Required method
fn prepare_from_transaction_enum(
decoder: &mut TransactionDecoder<'_>,
) -> Result<Self, PrepareError>;
// Provided method
fn prepare(
raw: &Self::Raw,
settings: &PreparationSettingsV1,
) -> Result<Self, PrepareError> { ... }
}
Expand description
Transaction payloads are models which are intended to be passed around in their raw form.
They should have a hash over a payload which starts with the bytes:
TRANSACTION_HASHABLE_PAYLOAD_PREFIX
TransactionDiscriminator::X as u8
Required Associated Types§
Required Methods§
Sourcefn prepare_from_transaction_enum(
decoder: &mut TransactionDecoder<'_>,
) -> Result<Self, PrepareError>
fn prepare_from_transaction_enum( decoder: &mut TransactionDecoder<'_>, ) -> Result<Self, PrepareError>
Prepares value from a transaction decoder by reading the Enum wrapper (including its value kind)
Provided Methods§
fn prepare( raw: &Self::Raw, settings: &PreparationSettingsV1, ) -> Result<Self, PrepareError>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.