Trait serdeconv::ToMsgPack

source ·
pub trait ToMsgPack: Serialize {
    // Provided methods
    fn to_msgpack_file<P: AsRef<Path>>(&self, path: P) -> Result<()> { ... }
    fn to_msgpack_writer<W: Write>(&self, writer: W) -> Result<()> { ... }
    fn to_msgpack_vec(&self) -> Result<Vec<u8>> { ... }
}
Expand description

This trait allows to convert serializable values to MessagePack binaries.

Provided Methods§

source

fn to_msgpack_file<P: AsRef<Path>>(&self, path: P) -> Result<()>

Converts this to a MessagePack bytes and writes it to the speficied file.

source

fn to_msgpack_writer<W: Write>(&self, writer: W) -> Result<()>

Converts this to a MessagePack bytes and writes it to the writer.

source

fn to_msgpack_vec(&self) -> Result<Vec<u8>>

Converts this to a MessagePack bytes.

Implementors§