Trait wasm_encoder::Encode

source ·
pub trait Encode {
    // Required method
    fn encode(&self, sink: &mut Vec<u8>);
}
Expand description

Implemented by types that can be encoded into a byte sink.

Required Methods§

source

fn encode(&self, sink: &mut Vec<u8>)

Encode the type into the given byte sink.

Implementations on Foreign Types§

source§

impl<T: Encode + ?Sized> Encode for &T

source§

fn encode(&self, sink: &mut Vec<u8>)

source§

impl<T: Encode> Encode for [T]

source§

fn encode(&self, sink: &mut Vec<u8>)

source§

impl Encode for [u8]

source§

fn encode(&self, sink: &mut Vec<u8>)

source§

impl Encode for str

source§

fn encode(&self, sink: &mut Vec<u8>)

source§

impl Encode for usize

source§

fn encode(&self, sink: &mut Vec<u8>)

source§

impl Encode for u32

source§

fn encode(&self, sink: &mut Vec<u8>)

source§

impl Encode for i32

source§

fn encode(&self, sink: &mut Vec<u8>)

source§

impl Encode for u64

source§

fn encode(&self, sink: &mut Vec<u8>)

source§

impl Encode for i64

source§

fn encode(&self, sink: &mut Vec<u8>)

source§

impl<T> Encode for Option<T>where T: Encode,

source§

fn encode(&self, sink: &mut Vec<u8>)

Implementors§

source§

impl Encode for Alias<'_>

source§

impl Encode for BlockType

source§

impl Encode for CanonicalOption

source§

impl Encode for ComponentExportKind

source§

impl Encode for ComponentOuterAliasKind

source§

impl Encode for ComponentSectionId

source§

impl Encode for ComponentTypeRef

source§

impl Encode for ComponentValType

source§

impl Encode for EntityType

source§

impl Encode for ExportKind

source§

impl Encode for Instruction<'_>

source§

impl Encode for ModuleArg

source§

impl Encode for PrimitiveValType

source§

impl Encode for SectionId

source§

impl Encode for TypeBounds

source§

impl Encode for ValType

source§

impl Encode for CanonicalFunctionSection

source§

impl Encode for CodeSection

source§

impl Encode for ComponentAliasSection

source§

impl Encode for ComponentExportSection

source§

impl Encode for ComponentImportSection

source§

impl Encode for ComponentInstanceSection

source§

impl Encode for ComponentNameSection

source§

impl Encode for ComponentType

source§

impl Encode for ComponentTypeSection

source§

impl Encode for ConstExpr

source§

impl Encode for CoreTypeSection

source§

impl Encode for CustomSection<'_>

source§

impl Encode for DataCountSection

source§

impl Encode for DataSection

source§

impl Encode for ElementSection

source§

impl Encode for ExportSection

source§

impl Encode for Function

source§

impl Encode for FunctionSection

source§

impl Encode for GlobalSection

source§

impl Encode for GlobalType

source§

impl Encode for ImportSection

source§

impl Encode for IndirectNameMap

source§

impl Encode for InstanceSection

source§

impl Encode for InstanceType

source§

impl Encode for LinkingSection

source§

impl Encode for MemArg

source§

impl Encode for MemorySection

source§

impl Encode for MemoryType

source§

impl Encode for ModuleSection<'_>

source§

impl Encode for ModuleType

source§

impl Encode for NameMap

source§

impl Encode for NameSection

source§

impl Encode for NestedComponentSection<'_>

source§

impl Encode for ProducersField

source§

impl Encode for ProducersSection

source§

impl Encode for RawSection<'_>

source§

impl Encode for StartSection

source§

impl Encode for SymbolTable

source§

impl Encode for TableSection

source§

impl Encode for TableType

source§

impl Encode for TagSection

source§

impl Encode for TagType

source§

impl Encode for TypeSection

source§

impl<A> Encode for ComponentStartSection<A>where A: AsRef<[u32]>,