wasm_encoder

Trait 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 Encode for f32

source§

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

source§

impl Encode for f64

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 i64

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 u32

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 usize

source§

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

source§

impl Encode for [u8]

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>)

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>)

Implementors§

source§

impl Encode for AbstractHeapType

source§

impl Encode for Alias<'_>

Available on crate feature component-model only.
source§

impl Encode for BlockType

source§

impl Encode for CanonicalOption

Available on crate feature component-model only.
source§

impl Encode for Catch

source§

impl Encode for ComponentExportKind

Available on crate feature component-model only.
source§

impl Encode for ComponentOuterAliasKind

Available on crate feature component-model only.
source§

impl Encode for ComponentSectionId

Available on crate feature component-model only.
source§

impl Encode for ComponentTypeRef

Available on crate feature component-model only.
source§

impl Encode for ComponentValType

Available on crate feature component-model only.
source§

impl Encode for CoreDumpValue

source§

impl Encode for EntityType

source§

impl Encode for ExportKind

source§

impl Encode for Handle

source§

impl Encode for HeapType

source§

impl Encode for Instruction<'_>

source§

impl Encode for ModuleArg

Available on crate feature component-model only.
source§

impl Encode for Ordering

source§

impl Encode for PrimitiveValType

Available on crate feature component-model only.
source§

impl Encode for SectionId

source§

impl Encode for StorageType

source§

impl Encode for TypeBounds

Available on crate feature component-model only.
source§

impl Encode for ValType

source§

impl Encode for BranchHints

source§

impl Encode for CanonicalFunctionSection

Available on crate feature component-model only.
source§

impl Encode for CodeSection

source§

impl Encode for ComponentAliasSection

Available on crate feature component-model only.
source§

impl Encode for ComponentExportSection

Available on crate feature component-model only.
source§

impl Encode for ComponentImportSection

Available on crate feature component-model only.
source§

impl Encode for ComponentInstanceSection

Available on crate feature component-model only.
source§

impl Encode for ComponentNameSection

Available on crate feature component-model only.
source§

impl Encode for ComponentType

Available on crate feature component-model only.
source§

impl Encode for ComponentTypeSection

Available on crate feature component-model only.
source§

impl Encode for ConstExpr

source§

impl Encode for CoreDumpInstancesSection

source§

impl Encode for CoreDumpModulesSection

source§

impl Encode for CoreDumpSection

source§

impl Encode for CoreDumpStackSection

source§

impl Encode for CoreTypeSection

Available on crate feature component-model only.
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

Available on crate feature component-model only.
source§

impl Encode for InstanceType

Available on crate feature component-model only.
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<'_>

Available on crate feature component-model only.
source§

impl Encode for ModuleType

Available on crate feature component-model only.
source§

impl Encode for NameMap

source§

impl Encode for NameSection

source§

impl Encode for NestedComponentSection<'_>

Available on crate feature component-model only.
source§

impl Encode for ProducersField

source§

impl Encode for ProducersSection

source§

impl Encode for RawCustomSection<'_>

source§

impl Encode for RawSection<'_>

source§

impl Encode for RefType

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]>,

Available on crate feature component-model only.