pub trait Fragment<'a>: Sized {
// Required methods
fn encode_fragment(&self) -> Result<Vec<u8>, Box<dyn Error>>;
fn decode_fragment(bytes: &'a [u8]) -> Result<Self, Box<dyn Error>>;
}Required Methods§
fn encode_fragment(&self) -> Result<Vec<u8>, Box<dyn Error>>
fn decode_fragment(bytes: &'a [u8]) -> Result<Self, Box<dyn Error>>
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.