Skip to main content

ContextualEncodeExt

Trait ContextualEncodeExt 

Source
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§

Source

fn contextual_encode<E>(&'a self, ctx: CTX) -> OUT
where E: ContextualEncode<Target = &'a Self, Context = CTX, Output = OUT>,

Call this method if the value is immutable.

Source

fn contextual_encode_mut<E>(&'a mut self, ctx: CTX) -> OUT
where 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".

Implementors§

Source§

impl<'a, T, CTX, OUT> ContextualEncodeExt<'a, CTX, OUT> for T