[][src]Trait rmp_serde::encode::Ext

pub trait Ext: UnderlyingWrite + Sized {
    fn with_struct_map(self) -> StructMapSerializer<Self> { ... }
fn with_struct_tuple(self) -> StructTupleSerializer<Self> { ... } }

Extends the serializer by allowing to generate extension wrappers.

Provided methods

fn with_struct_map(self) -> StructMapSerializer<Self>

Consumes this serializer returning the new one, which will serialize structs as a map.

This is used, when you the default struct serialization as a tuple does not fit your requirements.

fn with_struct_tuple(self) -> StructTupleSerializer<Self>

Consumes this serializer returning the new one, which will serialize structs as a tuple without field names.

This is the default MessagePack serialization mechanism, emitting the most compact representation.

Loading content...

Implementors

Loading content...