Skip to main content

MapExternalAuthErr

Trait MapExternalAuthErr 

Source
pub trait MapExternalAuthErr<T> {
    // Required method
    fn map_external_auth_err_ctx(
        self,
        context: impl Into<String>,
        error_fn: fn(String) -> ExternalAuthError,
    ) -> Result<T>;
}
Expand description

Extension trait for mapping lower-level errors into external auth errors with context.

Required Methods§

Source

fn map_external_auth_err_ctx( self, context: impl Into<String>, error_fn: fn(String) -> ExternalAuthError, ) -> Result<T>

Maps an error into ExternalAuthError by passing a context string to error_fn.

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> MapExternalAuthErr<T> for Result<T, E>
where E: Display,

Source§

fn map_external_auth_err_ctx( self, context: impl Into<String>, error_fn: fn(String) -> ExternalAuthError, ) -> Result<T>

Implementors§