Context1

Trait Context1 

Source
pub trait Context1: Sized {
    type Output;

    // Required method
    fn with_context1<C, F>(self, f: F) -> Self::Output
       where F: FnOnce() -> C,
             C: Display + Send + Sync + 'static;

    // Provided method
    fn context1<C>(self, s: C) -> Self::Output
       where C: Display + Send + Sync + 'static { ... }
}

Required Associated Types§

Required Methods§

Source

fn with_context1<C, F>(self, f: F) -> Self::Output
where F: FnOnce() -> C, C: Display + Send + Sync + 'static,

Provided Methods§

Source

fn context1<C>(self, s: C) -> Self::Output
where C: Display + Send + Sync + 'static,

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.

Implementations on Foreign Types§

Source§

impl<T, E> Context1 for Result<T, E>
where ErasedError1: From<E>,

Source§

type Output = Result<T, ErasedError1>

Source§

fn with_context1<C, F>(self, f: F) -> Self::Output
where F: FnOnce() -> C, C: Display + Send + Sync + 'static,

Implementors§