pub trait Serialize {
    type Error: From<Error>;

    // Required method
    fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>;
}
Expand description

Serialization to serial i/o. Takes self by value to consume less memory (parity-wasm IR is being partially freed by filling the result buffer).

Required Associated Types§

source

type Error: From<Error>

Serialization error produced by serialization routine.

Required Methods§

source

fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>

Serialize type to serial i/o

Implementations on Foreign Types§

source§

impl Serialize for String

§

type Error = Error

source§

fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Error>

Implementors§

source§

impl Serialize for BlockType

§

type Error = Error

source§

impl Serialize for External

§

type Error = Error

source§

impl Serialize for Instruction

§

type Error = Error

source§

impl Serialize for Internal

§

type Error = Error

source§

impl Serialize for RelocationEntry

§

type Error = Error

source§

impl Serialize for Section

§

type Error = Error

source§

impl Serialize for TableElementType

§

type Error = Error

source§

impl Serialize for Type

§

type Error = Error

source§

impl Serialize for ValueType

§

type Error = Error

source§

impl Serialize for CodeSection

§

type Error = Error

source§

impl Serialize for CustomSection

§

type Error = Error

source§

impl Serialize for DataSection

§

type Error = Error

source§

impl Serialize for DataSegment

§

type Error = Error

source§

impl Serialize for ElementSection

§

type Error = Error

source§

impl Serialize for ElementSegment

§

type Error = Error

source§

impl Serialize for ExportEntry

§

type Error = Error

source§

impl Serialize for ExportSection

§

type Error = Error

source§

impl Serialize for Func

§

type Error = Error

source§

impl Serialize for FuncBody

§

type Error = Error

source§

impl Serialize for FunctionNameSubsection

§

type Error = Error

source§

impl Serialize for FunctionSection

§

type Error = Error

source§

impl Serialize for FunctionType

§

type Error = Error

source§

impl Serialize for GlobalEntry

§

type Error = Error

source§

impl Serialize for GlobalSection

§

type Error = Error

source§

impl Serialize for GlobalType

§

type Error = Error

source§

impl Serialize for ImportEntry

§

type Error = Error

source§

impl Serialize for ImportSection

§

type Error = Error

source§

impl Serialize for InitExpr

§

type Error = Error

source§

impl Serialize for Instructions

§

type Error = Error

source§

impl Serialize for Local

§

type Error = Error

source§

impl Serialize for LocalNameSubsection

§

type Error = Error

source§

impl Serialize for MemorySection

§

type Error = Error

source§

impl Serialize for MemoryType

§

type Error = Error

source§

impl Serialize for Module

§

type Error = Error

source§

impl Serialize for ModuleNameSubsection

§

type Error = Error

source§

impl Serialize for NameSection

§

type Error = Error

source§

impl Serialize for RelocSection

§

type Error = Error

source§

impl Serialize for ResizableLimits

§

type Error = Error

source§

impl Serialize for TableSection

§

type Error = Error

source§

impl Serialize for TableType

§

type Error = Error

source§

impl Serialize for TypeSection

§

type Error = Error

source§

impl Serialize for Uint8

§

type Error = Error

source§

impl Serialize for Uint32

§

type Error = Error

source§

impl Serialize for Uint64

§

type Error = Error

source§

impl Serialize for VarInt7

§

type Error = Error

source§

impl Serialize for VarInt32

§

type Error = Error

source§

impl Serialize for VarInt64

§

type Error = Error

source§

impl Serialize for VarUint1

§

type Error = Error

source§

impl Serialize for VarUint7

§

type Error = Error

source§

impl Serialize for VarUint32

§

type Error = Error

source§

impl Serialize for VarUint64

§

type Error = Error

source§

impl<I: Serialize<Error = Error>, T: IntoIterator<Item = I>> Serialize for CountedListWriter<I, T>

§

type Error = Error

source§

impl<T> Serialize for IndexMap<T>where T: Serialize, Error: From<<T as Serialize>::Error>,

§

type Error = Error