TransactionPreparableFromValue

Trait TransactionPreparableFromValue 

Source
pub trait TransactionPreparableFromValue: Sized + HasSummary {
    // Required method
    fn prepare_from_value(
        decoder: &mut TransactionDecoder<'_>,
    ) -> Result<Self, PrepareError>;
}
Expand description

Should read the SBOR value kind, and then the rest of the SBOR value.

NOTE:

  • In V1, the hash included the value kind byte.
  • In V2, the hash does not include the value kind byte (which enables the hash to be the same when a Vec child as well as when full values).

There is a blanket implementation of TransactionPreparableFromValue for types which support TransactionPreparableFromValueBody, therefore from V2 onwards, this should not be implemented directly.

Required Methods§

Source

fn prepare_from_value( decoder: &mut TransactionDecoder<'_>, ) -> Result<Self, PrepareError>

Prepares value from a manifest decoder by reading the full SBOR value That is - the value kind, and then the value body.

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.

Implementors§