pub trait BytesRepr {
type Ctx;
const MAX_LEN: usize;
const SIZE: Option<usize>;
// Required methods
fn serialize(text: &[u8], buf: &mut Vec<u8>);
fn deserialize<'de>(
ctx: Self::Ctx,
buf: &mut ParseBuf<'de>,
) -> Result<Cow<'de, [u8]>>;
}
Expand description
Representation of a serialized bytes.
Required Associated Constants§
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.