DecodeWithMetadata

Trait DecodeWithMetadata 

Source
pub trait DecodeWithMetadata: Sized {
    // Required method
    fn decode_with_metadata(
        bytes: &mut &[u8],
        type_id: u32,
        metadata: &Metadata,
    ) -> Result<Self, Error>;
}
Expand description

This trait is implemented for all types that also implement scale_decode::DecodeAsType.

Required Methods§

Source

fn decode_with_metadata( bytes: &mut &[u8], type_id: u32, metadata: &Metadata, ) -> Result<Self, Error>

Given some metadata and a type ID, attempt to SCALE decode the provided bytes into Self.

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§