pub(super) trait Ext: Sized {
type Id: From<u8> + Into<u8>;
// Required methods
fn type_id(&self) -> Self::Id;
fn take_body_from(b: &mut Reader<'_>) -> Result<Self>;
fn write_body_onto<B: Writer + ?Sized>(&self, b: &mut B) -> EncodeResult<()>;
}Expand description
A single typed extension that can be used with some kind of relay message.
Required Associated Types§
Required Methods§
Sourcefn take_body_from(b: &mut Reader<'_>) -> Result<Self>
fn take_body_from(b: &mut Reader<'_>) -> Result<Self>
Extract the body (not the type or the length) from a single extension.
Sourcefn write_body_onto<B: Writer + ?Sized>(&self, b: &mut B) -> EncodeResult<()>
fn write_body_onto<B: Writer + ?Sized>(&self, b: &mut B) -> EncodeResult<()>
Write the body (not the type or the length) for a single extension.
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.