pub trait EmailVerificationSender: Send + Sync {
// Required method
fn send_verification_token<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
email: &'life1 str,
user_id: &'life2 str,
token: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Delivers a verification token to the mailbox it proves ownership of.
The token is a proof of inbox control, so it must travel ONLY through this channel and
never appear in an HTTP response. Implementations send token to email; failures are
logged by the caller (without the error text) and never reported to the requester. Errors
returned here must not contain the token.
Required Methods§
Sourcefn send_verification_token<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
email: &'life1 str,
user_id: &'life2 str,
token: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn send_verification_token<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
email: &'life1 str,
user_id: &'life2 str,
token: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Send token to email, the address registered for user_id.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".