serdeconv

Trait FromMsgPack

Source
pub trait FromMsgPack: for<'a> Deserialize<'a> {
    // Provided methods
    fn from_msgpack_file<P: AsRef<Path>>(path: P) -> Result<Self> { ... }
    fn from_msgpack_reader<R: Read>(reader: R) -> Result<Self> { ... }
    fn from_msgpack_slice(toml: &[u8]) -> Result<Self> { ... }
}
Expand description

This trait allows to convert MessagePack binaries to deserializable values.

Provided Methods§

Source

fn from_msgpack_file<P: AsRef<Path>>(path: P) -> Result<Self>

Converts from the MessagePack file to an instance of this implementation.

Source

fn from_msgpack_reader<R: Read>(reader: R) -> Result<Self>

Reads a MessagePack bytes from the reader and converts it to an instance of this implementation.

Source

fn from_msgpack_slice(toml: &[u8]) -> Result<Self>

Converts from the MessagePack bytes to an instance of this implementation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§