TransactionPreparableFromValueBody

Trait TransactionPreparableFromValueBody 

Source
pub trait TransactionPreparableFromValueBody: Sized + HasSummary {
    const ADDITIONAL_SUMMARY_LENGTH_AS_VALUE: usize = 1usize;

    // Required methods
    fn prepare_from_value_body(
        decoder: &mut TransactionDecoder<'_>,
    ) -> Result<Self, PrepareError>;
    fn value_kind() -> ValueKind<ManifestCustomValueKind>;
}
Expand description

Intended for use when the value is encoded without a prefix byte, e.g. when it’s under an array.

Should only decode the value body, NOT read the SBOR value kind.

NOTE:

  • The hash should align with the hash from other means. Ideally this means the hash should not include the header byte.
  • Ideally the summary should not include costing for reading the value kind byte.

Provided Associated Constants§

Source

const ADDITIONAL_SUMMARY_LENGTH_AS_VALUE: usize = 1usize

Most types when read as a value should have a slightly longer length. BUT some types (e.g. transaction payloads) must have the same length regardless, as this length is used for billing the transaction.

Required Methods§

Source

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

Prepares the transaction from a transaction decoder by reading the inner body of the tuple/enum (without the value kind)

Source

fn value_kind() -> ValueKind<ManifestCustomValueKind>

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§

Source§

impl TransactionPreparableFromValueBody for PreparedChildSubintentSpecifiersV2

Source§

impl TransactionPreparableFromValueBody for PreparedIntentCoreV2

Source§

impl TransactionPreparableFromValueBody for PreparedIntentV1

Source§

impl TransactionPreparableFromValueBody for PreparedNonRootSubintentSignaturesV2

Source§

impl TransactionPreparableFromValueBody for PreparedNonRootSubintentsV2

Source§

impl TransactionPreparableFromValueBody for PreparedNotarizedTransactionV1

Source§

impl TransactionPreparableFromValueBody for PreparedNotarizedTransactionV2

Source§

impl TransactionPreparableFromValueBody for PreparedPartialTransactionV2

Source§

impl TransactionPreparableFromValueBody for PreparedPreviewTransactionV2

Source§

impl TransactionPreparableFromValueBody for PreparedSignedIntentV1

Source§

impl TransactionPreparableFromValueBody for PreparedSignedPartialTransactionV2

Source§

impl TransactionPreparableFromValueBody for PreparedSignedTransactionIntentV2

Source§

impl TransactionPreparableFromValueBody for PreparedSubintentV2

Source§

impl TransactionPreparableFromValueBody for PreparedTransactionIntentV2

Source§

impl TransactionPreparableFromValueBody for RawHash

Source§

impl TransactionPreparableFromValueBody for SummarizedRawValueBodyRawBytes

Source§

impl<T> TransactionPreparableFromValueBody for SummarizedRawValueBody<T>

Source§

impl<T> TransactionPreparableFromValueBody for SummarizedRawValueBodyWithReferences<T>