pub struct UserManagementCallbacks<S: AuthSchema> { /* private fields */ }Expand description
User notification factories with the complete endpoint and original Request.
Return None for synchronous completion or an owned future for background scheduling.
Implementations§
Source§impl<S: AuthSchema> UserManagementCallbacks<S>
impl<S: AuthSchema> UserManagementCallbacks<S>
Sourcepub fn new() -> Self
pub fn new() -> Self
Use the existing configured senders until a factory overrides each delivery path.
Sourcepub fn change_email_confirmation(
self,
callback: impl Fn(&ChangeEmailConfirmation, &EndpointContext<'_, S>) -> AuthResult<Option<BackgroundFuture>> + Send + Sync + 'static,
) -> Self
pub fn change_email_confirmation( self, callback: impl Fn(&ChangeEmailConfirmation, &EndpointContext<'_, S>) -> AuthResult<Option<BackgroundFuture>> + Send + Sync + 'static, ) -> Self
Send confirmation to the current address of a verified user.
Sourcepub fn delete_account_verification(
self,
callback: impl Fn(&VerificationEmail, &EndpointContext<'_, S>) -> AuthResult<Option<BackgroundFuture>> + Send + Sync + 'static,
) -> Self
pub fn delete_account_verification( self, callback: impl Fn(&VerificationEmail, &EndpointContext<'_, S>) -> AuthResult<Option<BackgroundFuture>> + Send + Sync + 'static, ) -> Self
Send account deletion confirmation after the verification record is stored.
Trait Implementations§
Source§impl<S: AuthSchema> Default for UserManagementCallbacks<S>
impl<S: AuthSchema> Default for UserManagementCallbacks<S>
Auto Trait Implementations§
impl<S> !RefUnwindSafe for UserManagementCallbacks<S>
impl<S> !UnwindSafe for UserManagementCallbacks<S>
impl<S> Freeze for UserManagementCallbacks<S>where
Option<Arc<dyn Fn(&ChangeEmailConfirmation, &EndpointContext<'_, S>) -> Result<Option<Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>>>, AuthError> + Send + Sync>>: Freeze,
Option<Arc<dyn Fn(&VerificationEmail, &EndpointContext<'_, S>) -> Result<Option<Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>>>, AuthError> + Send + Sync>>: Freeze,
impl<S> Send for UserManagementCallbacks<S>where
Option<Arc<dyn Fn(&ChangeEmailConfirmation, &EndpointContext<'_, S>) -> Result<Option<Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>>>, AuthError> + Send + Sync>>: Send,
Option<Arc<dyn Fn(&VerificationEmail, &EndpointContext<'_, S>) -> Result<Option<Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>>>, AuthError> + Send + Sync>>: Send,
impl<S> Sync for UserManagementCallbacks<S>where
Option<Arc<dyn Fn(&ChangeEmailConfirmation, &EndpointContext<'_, S>) -> Result<Option<Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>>>, AuthError> + Send + Sync>>: Sync,
Option<Arc<dyn Fn(&VerificationEmail, &EndpointContext<'_, S>) -> Result<Option<Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>>>, AuthError> + Send + Sync>>: Sync,
impl<S> Unpin for UserManagementCallbacks<S>where
Option<Arc<dyn Fn(&ChangeEmailConfirmation, &EndpointContext<'_, S>) -> Result<Option<Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>>>, AuthError> + Send + Sync>>: Unpin,
Option<Arc<dyn Fn(&VerificationEmail, &EndpointContext<'_, S>) -> Result<Option<Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>>>, AuthError> + Send + Sync>>: Unpin,
impl<S> UnsafeUnpin for UserManagementCallbacks<S>where
Option<Arc<dyn Fn(&ChangeEmailConfirmation, &EndpointContext<'_, S>) -> Result<Option<Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>>>, AuthError> + Send + Sync>>: UnsafeUnpin,
Option<Arc<dyn Fn(&VerificationEmail, &EndpointContext<'_, S>) -> Result<Option<Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send>>>, AuthError> + Send + Sync>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more