Trait glory_cli::ext::anyhow::Context

source ·
pub trait Context<T, E> {
    // Required methods
    fn context<C>(self, context: C) -> Result<T>
       where C: Display + Send + Sync + 'static;
    fn with_context<C, F>(self, context: F) -> Result<T>
       where C: Display + Send + Sync + 'static,
             F: FnOnce() -> C;
    fn dot(self) -> Result<T>;
}

Required Methods§

source

fn context<C>(self, context: C) -> Result<T>where C: Display + Send + Sync + 'static,

source

fn with_context<C, F>(self, context: F) -> Result<T>where C: Display + Send + Sync + 'static, F: FnOnce() -> C,

source

fn dot(self) -> Result<T>

like google map red dot, only record the location info without any context message.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<T> Context<T, Infallible> for Option<T>where Option<T>: Context<T, Infallible>,

source§

fn context<C>(self, context: C) -> Result<T, Error>where C: Display + Send + Sync + 'static,

source§

fn with_context<C, F>(self, context: F) -> Result<T, Error>where C: Display + Send + Sync + 'static, F: FnOnce() -> C,

source§

fn dot(self) -> Result<T>

Implementors§

source§

impl<T, E> Context<T, E> for Result<T, E>where E: Display, Result<T, E>: Context<T, E>,