pub trait DecodeBytes<'de>: Sized {
// Required method
fn decode_bytes_with_format<R>(
format: Format,
reader: &mut R,
) -> Result<Self, Error<R::Error>>
where R: IoRead<'de>;
// Provided method
fn decode_bytes<R>(reader: &mut R) -> Result<Self, Error<R::Error>>
where R: IoRead<'de> { ... }
}Expand description
Trait for decoding MessagePack binary data.
Used by the derive macro for #[msgpack(bytes)] fields.
Implement this trait for types that can be decoded from a MessagePack bin format.
Required Methods§
Provided Methods§
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.
Implementations on Foreign Types§
Source§impl<'de> DecodeBytes<'de> for &'de [u8]
impl<'de> DecodeBytes<'de> for &'de [u8]
Source§impl<'de> DecodeBytes<'de> for Box<[u8]>
Available on crate feature alloc only.
impl<'de> DecodeBytes<'de> for Box<[u8]>
Available on crate feature
alloc only.Source§impl<'de> DecodeBytes<'de> for Vec<u8>
Available on crate feature alloc only.
impl<'de> DecodeBytes<'de> for Vec<u8>
Available on crate feature
alloc only.