referrerpolicy=no-referrer-when-downgrade

Trait LazyExtrinsic

pub trait LazyExtrinsic: Sized {
    // Required method
    fn decode_unprefixed(data: &[u8]) -> Result<Self, Error>;
}
Expand description

An extrinsic that can be lazily decoded.

Required Methods§

fn decode_unprefixed(data: &[u8]) -> Result<Self, Error>

Try to decode the lazy extrinsic.

Usually an encoded extrinsic is composed of 2 parts:

  • a Compact<u32> prefix (len)
  • a blob of size len This method expects to receive just the blob as a byte slice. The size of the blob is the len.

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§

§

impl LazyExtrinsic for OpaqueExtrinsic

§

impl<Address, Call, Signature, Extension, const MAX_CALL_SIZE: usize> LazyExtrinsic for UncheckedExtrinsic<Address, Call, Signature, Extension, MAX_CALL_SIZE>
where Preamble<Address, Signature, Extension>: Decode, Call: DecodeWithMemTracking,