Trait ContextualDecodeExt

Source
pub trait ContextualDecodeExt<'a, CTX, OUT>: Sized {
    // Required methods
    fn contextual_decode<D>(&'a self, ctx: CTX) -> OUT
       where D: ContextualDecode<Target = &'a Self, Context = CTX, Output = OUT>;
    fn contextual_decode_mut<D>(&'a mut self, ctx: CTX) -> OUT
       where D: ContextualDecode<Target = &'a mut Self, Context = CTX, Output = OUT>;
}
Expand description

Trait that provides the contextual decode method for any value.

Required Methods§

Source

fn contextual_decode<D>(&'a self, ctx: CTX) -> OUT
where D: ContextualDecode<Target = &'a Self, Context = CTX, Output = OUT>,

Call this method if the value is immutable.

Source

fn contextual_decode_mut<D>(&'a mut self, ctx: CTX) -> OUT
where D: ContextualDecode<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.

Implementors§

Source§

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