Skip to main content

AsyncTokenProvider

Trait AsyncTokenProvider 

Source
pub trait AsyncTokenProvider: Send + Sync {
    // Required method
    fn resolve(
        &self,
    ) -> Pin<Box<dyn Future<Output = Option<String>> + Send + '_>>;
}
Expand description

Async token resolver.

Required Methods§

Source

fn resolve(&self) -> Pin<Box<dyn Future<Output = Option<String>> + Send + '_>>

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<F, Fut> AsyncTokenProvider for F
where F: Send + Sync + Fn() -> Fut, Fut: Future<Output = Option<String>> + Send + 'static,