Skip to main content

AuthResolverFn

Trait AuthResolverFn 

Source
pub trait AuthResolverFn: Send + Sync {
    // Required methods
    fn exec_fn(&self, model_iden: ModelIden) -> Result<Option<AuthData>>;
    fn clone_box(&self) -> Box<dyn AuthResolverFn>;
}
Expand description

The AuthResolverFn trait object.

Required Methods§

Source

fn exec_fn(&self, model_iden: ModelIden) -> Result<Option<AuthData>>

Execute the AuthResolverFn to get the AuthData.

Source

fn clone_box(&self) -> Box<dyn AuthResolverFn>

Clone the trait object.

Trait Implementations§

Source§

impl Clone for Box<dyn AuthResolverFn>

Source§

fn clone(&self) -> Box<dyn AuthResolverFn>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for dyn AuthResolverFn

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<F> AuthResolverFn for F
where F: FnOnce(ModelIden) -> Result<Option<AuthData>> + Send + Sync + Clone + 'static,

AuthResolverFn blanket implementation for any function that matches the AuthResolver function signature.