Skip to main content

EncodeWithMetadata

Trait EncodeWithMetadata 

Source
pub trait EncodeWithMetadata {
    // Required method
    fn encode_with_metadata(
        &self,
        type_id: u32,
        metadata: &Metadata,
        bytes: &mut Vec<u8>,
    ) -> Result<(), Error>;
}
Expand description

This trait is implemented for all types that also implement scale_encode::EncodeAsType.

Required Methods§

Source

fn encode_with_metadata( &self, type_id: u32, metadata: &Metadata, bytes: &mut Vec<u8>, ) -> Result<(), Error>

SCALE encode this type to bytes, possibly with the help of metadata.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§