# [−] [src] Trait parity_wasm::elements::Serialize

    pub trait Serialize {
        type Error: From<Error>;
        fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>;
    }

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

## Associated Types

### `type Error: From<Error>`

Serialization error produced by serialization routine.

Loading content...

## Required methods

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

Serialize type to serial i/o

Loading content...

## Implementations on Foreign Types

### `impl Serialize for String` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Error>` [src]

Loading content...

## Implementors

### `impl Serialize for BlockType` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for External` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for Instruction` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for Internal` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for RelocationEntry` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, wtr: &mut W) -> Result<(), Error>` [src]

### `impl Serialize for Section` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for TableElementType` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for Type` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for ValueType` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for CodeSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for CustomSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for DataSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for DataSegment` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for ElementSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for ElementSegment` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for ExportEntry` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for ExportSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for Func` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for FuncBody` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for FunctionNameSubsection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, wtr: &mut W) -> Result<(), Error>` [src]

### `impl Serialize for FunctionSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for FunctionType` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for GlobalEntry` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for GlobalSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for GlobalType` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for ImportEntry` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for ImportSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for InitExpr` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for Instructions` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for Local` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for LocalNameSubsection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, wtr: &mut W) -> Result<(), Error>` [src]

### `impl Serialize for MemorySection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for MemoryType` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for Module` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, w: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for ModuleNameSubsection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, wtr: &mut W) -> Result<(), Error>` [src]

### `impl Serialize for NameSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, wtr: &mut W) -> Result<(), Error>` [src]

### `impl Serialize for RelocSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, wtr: &mut W) -> Result<(), Error>` [src]

### `impl Serialize for ResizableLimits` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for TableSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for TableType` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for TypeSection` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for Uint32` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for Uint64` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for Uint8` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for VarInt32` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for VarInt64` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for VarInt7` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for VarUint1` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for VarUint32` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for VarUint64` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl Serialize for VarUint7` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl<I: Serialize<Error = Error>, T: IntoIterator<Item = I>> Serialize for CountedListWriter<I, T>` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, writer: &mut W) -> Result<(), Self::Error>` [src]

### `impl<T> Serialize for IndexMap<T> where
T: Serialize,
Error: From<<T as Serialize>::Error>,` [src]

#### `type Error = Error`

#### `fn serialize<W: Write>(self, wtr: &mut W) -> Result<(), Self::Error>` [src]

Loading content...

# Help

## Keyboard Shortcuts

`?`
  Show this help dialog
`S`
  Focus the search field
`↑`
  Move up in search results
`↓`
  Move down in search results
`↹`
  Switch tab
`⏎`
  Go to active search result
`+`
  Expand all sections
`-`
  Collapse all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g., `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g., `vec -> usize` or `* -> vec`)

Search multiple things at once by splitting your query with comma (e.g., `str,u8` or `String,struct:Vec,test`)