TransactionExtension

Trait TransactionExtension 

Source
pub trait TransactionExtension<T>: ExtrinsicParams<T>
where T: Config,
{ type Decoded: DecodeAsType; // Required method fn matches( identifier: &str, _type_id: u32, _types: &PortableRegistry, ) -> bool; }
Expand description

A single TransactionExtension has a unique name, but is otherwise the same as ExtrinsicParams in describing how to encode the extra and additional data.

Required Associated Types§

Source

type Decoded: DecodeAsType

The type representing the extra / value bytes of a transaction extension. Decoding from this type should be symmetrical to the respective ExtrinsicParamsEncoder::encode_value_to() implementation of this transaction extension.

Required Methods§

Source

fn matches(identifier: &str, _type_id: u32, _types: &PortableRegistry) -> bool

This should return true if the transaction extension matches the details given. Often, this will involve just checking that the identifier given matches that of the extension in question.

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.

Implementations on Foreign Types§

Source§

impl<T> TransactionExtension<T> for CheckAppId
where T: Config,

Source§

type Decoded = Compact<u32>

Source§

fn matches(identifier: &str, _type_id: u32, _types: &PortableRegistry) -> bool

Implementors§