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