pub trait BytesEncode<'a> {
type EItem: 'a + ?Sized;
// Required method
fn bytes_encode(
item: &'a Self::EItem,
) -> Result<Cow<'a, [u8]>, Box<dyn Error + Send + Sync>>;
}
Expand description
A trait that represents an encoding structure.
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.