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.