[][src]Trait wasmer_interface_types_fl::ToBytes

pub trait ToBytes<W> where
    W: Write
{ pub fn to_bytes(&self, writer: &mut W) -> Result<(), Error>; }

A trait for converting a value to bytes.

Required methods

pub fn to_bytes(&self, writer: &mut W) -> Result<(), Error>[src]

Converts the given value into &[u8] in the given writer.

Loading content...

Implementations on Foreign Types

impl<W> ToBytes<W> for u8 where
    W: Write
[src]

Encode a u8 into a byte (well, it's already a byte!).

impl<W> ToBytes<W> for u64 where
    W: Write
[src]

Encode a u64 into bytes with a LEB128 representation.

Decoder is decoders::binary::uleb.

impl<'_, W> ToBytes<W> for &'_ str where
    W: Write
[src]

Encode a str into bytes.

Decoder is decoders::binary::string.

impl<W> ToBytes<W> for String where
    W: Write
[src]

Encode a String into bytes.

Decoder is decoders::binary::string.

impl<W, I> ToBytes<W> for Vec<I, Global> where
    I: ToBytes<W>,
    W: Write
[src]

Encode a vector into bytes.

Decoder is decoders::binary::list.

Loading content...

Implementors

impl<W> ToBytes<W> for InterfaceKind where
    W: Write
[src]

Encode an InterfaceKind into bytes.

impl<W> ToBytes<W> for Type where
    W: Write
[src]

Encode a Type into bytes.

Decoder is in decoders::binary::types.

impl<W> ToBytes<W> for TypeKind where
    W: Write
[src]

Encode a TypeKind into bytes.

impl<W> ToBytes<W> for IType where
    W: Write
[src]

Encode an IType into bytes.

impl<W> ToBytes<W> for Instruction where
    W: Write
[src]

Encode an Instruction into bytes.

Decoder is decoders::binary::instruction.

impl<W> ToBytes<W> for Adapter where
    W: Write
[src]

Encode an Adapter into bytes.

Decoder is in decoders::binary::adapters.

impl<W> ToBytes<W> for Export<'_> where
    W: Write
[src]

Encode an Export into bytes.

Decoder is in decoders::binary::exports.

impl<W> ToBytes<W> for FunctionArg where
    W: Write
[src]

impl<W> ToBytes<W> for Implementation where
    W: Write
[src]

Encode an Implementation into bytes.

Decoder is in decoders::binary::implementations.

impl<W> ToBytes<W> for Import<'_> where
    W: Write
[src]

Encode an Import into bytes.

Decoder is in decoders::binary::imports.

impl<W> ToBytes<W> for Interfaces<'_> where
    W: Write
[src]

Encode an Interfaces into bytes.

Decoder is decoders::binary::parse.

impl<W> ToBytes<W> for RecordFieldType where
    W: Write
[src]

Encode a RecordType into bytes.

impl<W> ToBytes<W> for RecordType where
    W: Write
[src]

Encode a RecordType into bytes.

Loading content...