Struct rmp_serialize::encode::Encoder [] [src]

pub struct Encoder<'a> { /* fields omitted */ }

Represents MessagePack serialization implementation.

Note

MessagePack has no specification about how to encode variant types. Thus we are free to do whatever we want, so the given chose may be not ideal for you.

Every Rust variant value can be represented as a tuple of index and a value.

All instances of ErrorKind::Interrupted are handled by this function and the underlying operation is retried.

Methods

impl<'a> Encoder<'a>
[src]

Creates a new MessagePack encoder whose output will be written to the writer specified.

Trait Implementations

impl<'a> Encoder for Encoder<'a>
[src]

The error type for method results.

Emit a nil value. Read more

Emit a bool value. Read more

Emit a u8 value.

Emit a u16 value.

Emit a u32 value.

Emit a u64 value.

Emit a usize value.

Emit a i8 value.

Emit a i16 value.

Emit a i32 value.

Emit a i64 value.

Emit a isize value.

Emit a f32 value.

Emit a f64 value.

Emit a char value. Read more

Emit a string value.

Encodes and attempts to write the enum value into the Write.

Currently we encode variant types as a tuple of id with array of args, like: [id, [args...]]

Encodes and attempts to write a concrete variant value.

Encodes and attempts to write a concrete variant value arguments.

Emit a enumeration variant value with no or named data. Read more

Emit a named data item for an enumeration variant. Read more

Emit a struct value. Read more

Emit a field item for a struct. Read more

Emit a tuple value. Read more

Emit a data item for a tuple. Read more

Emit a tuple struct value. Read more

Emit a data item for a tuple struct. Read more

Emit an optional value. Read more

Emit the None optional value. Read more

Emit the Some(x) optional value. Read more

Emit a sequence of values. Read more

Emit an element in a sequence. Read more

Emit an associative container (map). Read more

Emit the key for an entry in a map. Read more

Emit the value for an entry in a map. Read more