Skip to main content

ClientErrorHandling

Trait ClientErrorHandling 

Source
pub trait ClientErrorHandling {
    // Required methods
    fn handle_error<T>(&self, result: Result<T>, operation: &str) -> Result<T>;
    async fn handle_async_error<T, F>(&self, f: F, operation: &str) -> Result<T>
       where F: Future<Output = Result<T>>;
}
Expand description

客户端错误处理扩展特征

Required Methods§

Source

fn handle_error<T>(&self, result: Result<T>, operation: &str) -> Result<T>

处理错误并添加客户端上下文

Source

async fn handle_async_error<T, F>(&self, f: F, operation: &str) -> Result<T>
where F: Future<Output = Result<T>>,

处理异步错误并添加客户端上下文

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§