pub trait DatabaseHooks<S, B>: Send + Syncwhere
S: AuthSchema,
B: HookBackend,{
Show 28 methods
// Provided methods
fn before_create_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user: &'life1 mut CreateUser,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn after_create_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_update_user<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_id: &'life1 str,
_update: &'life2 mut UpdateUser,
_ctx: &'life3 DatabaseHookContext<'life4, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait { ... }
fn after_update_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_delete_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn after_delete_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_create_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 mut CreateSession,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn after_create_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_update_session<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_fields: &'life2 mut FieldValues,
_ctx: &'life3 DatabaseHookContext<'life4, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait { ... }
fn after_update_session_missing<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn after_update_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_delete_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn after_delete_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_create_account<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_account: &'life1 mut CreateAccount,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn after_create_account<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_account: &'life1 <S as AuthSchema>::Account,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_update_account<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_id: &'life1 str,
_update: &'life2 mut UpdateAccount,
_ctx: &'life3 DatabaseHookContext<'life4, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait { ... }
fn after_update_account<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_account: &'life1 <S as AuthSchema>::Account,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_delete_account<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_account: &'life1 <S as AuthSchema>::Account,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn after_delete_account<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_account: &'life1 <S as AuthSchema>::Account,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_create_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_verification: &'life1 mut CreateVerification,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_create_verification_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
candidate: &'life1 mut VerificationCreation,
ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn after_create_verification_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
snapshot: &'life1 VerificationSnapshot,
ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn after_create_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_verification: &'life1 <S as AuthSchema>::Verification,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_delete_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_verification: &'life1 <S as AuthSchema>::Verification,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn before_update_verification<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_id: &'life1 str,
_update: &'life2 mut UpdateVerification,
_ctx: &'life3 DatabaseHookContext<'life4, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait { ... }
fn after_update_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_verification: &'life1 <S as AuthSchema>::Verification,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn after_update_verification_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
snapshot: Option<&'life1 VerificationSnapshot>,
ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
fn after_delete_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_verification: &'life1 <S as AuthSchema>::Verification,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait { ... }
}Expand description
Lifecycle hooks for intercepting auth writes.
Transactional creation after callbacks retain the created snapshots and run in operation order after commit. Rollback discards them; callback errors are returned to the caller after the auth writes have committed.
Provided Methods§
fn before_create_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user: &'life1 mut CreateUser,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn after_create_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_update_user<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_id: &'life1 str,
_update: &'life2 mut UpdateUser,
_ctx: &'life3 DatabaseHookContext<'life4, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn after_update_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_delete_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn after_delete_user<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_user: &'life1 <S as AuthSchema>::User,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_create_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 mut CreateSession,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn after_create_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_update_session<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_fields: &'life2 mut FieldValues,
_ctx: &'life3 DatabaseHookContext<'life4, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
Sourcefn after_update_session_missing<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn after_update_session_missing<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_token: &'life1 str,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Observe an update that ran its before hooks but found no persisted row. A before-hook veto does not invoke this callback.
fn after_update_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_delete_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn after_delete_session<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_session: &'life1 <S as AuthSchema>::Session,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_create_account<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_account: &'life1 mut CreateAccount,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn after_create_account<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_account: &'life1 <S as AuthSchema>::Account,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_update_account<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_id: &'life1 str,
_update: &'life2 mut UpdateAccount,
_ctx: &'life3 DatabaseHookContext<'life4, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn after_update_account<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_account: &'life1 <S as AuthSchema>::Account,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_delete_account<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_account: &'life1 <S as AuthSchema>::Account,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn after_delete_account<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_account: &'life1 <S as AuthSchema>::Account,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_create_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_verification: &'life1 mut CreateVerification,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Sourcefn before_create_verification_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
candidate: &'life1 mut VerificationCreation,
ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_create_verification_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
candidate: &'life1 mut VerificationCreation,
ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Observe initialized defaults and transform the actual admitted candidate. The legacy domain hook remains available for existing applications.
Sourcefn after_create_verification_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
snapshot: &'life1 VerificationSnapshot,
ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn after_create_verification_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
snapshot: &'life1 VerificationSnapshot,
ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Secondary-only values have no invented model or ID. The legacy model callback is invoked only when a real physical model was persisted.
fn after_create_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_verification: &'life1 <S as AuthSchema>::Verification,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_delete_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_verification: &'life1 <S as AuthSchema>::Verification,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn before_update_verification<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
_id: &'life1 str,
_update: &'life2 mut UpdateVerification,
_ctx: &'life3 DatabaseHookContext<'life4, B>,
) -> Pin<Box<dyn Future<Output = Result<HookControl, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Self: 'async_trait,
fn after_update_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_verification: &'life1 <S as AuthSchema>::Verification,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Sourcefn after_update_verification_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
snapshot: Option<&'life1 VerificationSnapshot>,
ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
fn after_update_verification_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
snapshot: Option<&'life1 VerificationSnapshot>,
ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Identifier updates invoke after hooks even when the adapter matched no row. Actual physical snapshots bridge the existing model callback.
fn after_delete_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_verification: &'life1 <S as AuthSchema>::Verification,
_ctx: &'life2 DatabaseHookContext<'life3, B>,
) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Self: 'async_trait,
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".