pub trait SerializeAsBytes {
type Inner: FromBytes + Immutable + Copy;
// Required methods
fn as_bytes(&self) -> &[u8] ⓘ;
fn from_vec(slice: Vec<Self::Inner>) -> Self;
}Expand description
A trait for container types that can be efficiently serialized as a byte slice and
reconstructed from a Vec of their elements.
Required Associated Types§
Required 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.