pub trait SendTwoFactorOtp: Send + Sync {
// Required method
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 UserView,
otp: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait;
}Expand description
Callback used by the two-factor plugin to deliver a one-time password.
Required Methods§
Sourcefn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 UserView,
otp: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
fn send<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user: &'life1 UserView,
otp: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Send a one-time password to the given user.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".