Trait serdeconv::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§
sourcefn from_msgpack_file<P: AsRef<Path>>(path: P) -> Result<Self>
fn from_msgpack_file<P: AsRef<Path>>(path: P) -> Result<Self>
Converts from the MessagePack file to an instance of this implementation.
sourcefn from_msgpack_reader<R: Read>(reader: R) -> Result<Self>
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.
sourcefn from_msgpack_slice(toml: &[u8]) -> Result<Self>
fn from_msgpack_slice(toml: &[u8]) -> Result<Self>
Converts from the MessagePack bytes to an instance of this implementation.