pub trait EncodeExt<'a, OUT>: Sized {
// Required methods
fn encode<E>(&'a self) -> OUT
where E: Encode<Target = &'a Self, Output = OUT>;
fn encode_mut<E>(&'a mut self) -> OUT
where E: Encode<Target = &'a mut Self, Output = OUT>;
}
Expand description
Trait that provides the encode method for any value.
Required Methods§
Sourcefn encode<E>(&'a self) -> OUTwhere
E: Encode<Target = &'a Self, Output = OUT>,
fn encode<E>(&'a self) -> OUTwhere
E: Encode<Target = &'a Self, Output = OUT>,
Call this method if the value is immutable.
Sourcefn encode_mut<E>(&'a mut self) -> OUTwhere
E: Encode<Target = &'a mut Self, Output = OUT>,
fn encode_mut<E>(&'a mut self) -> OUTwhere
E: Encode<Target = &'a mut Self, Output = OUT>,
Call this method if the value is mutable.
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.