pub trait VerificationStore<S: AuthSchema>: Send + Sync {
Show 16 methods
// Required methods
fn create_verification<'life0, 'async_trait>(
&'life0 self,
verification: CreateVerification,
) -> Pin<Box<dyn Future<Output = AuthResult<S::Verification>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_verification<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
identifier: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn get_verification_by_value<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_verification_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn consume_verification<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
identifier: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_verification<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_expired_verifications<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AuthResult<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
// Provided methods
fn create_verification_record<'life0, 'async_trait>(
&'life0 self,
_data: VerificationCreation,
_publication: VerificationPublication,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<VerificationSnapshot>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
fn consume_verification_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn update_verification_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
_data: UpdateVerification,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<VerificationSnapshot>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn reserve_verification_record<'life0, 'life1, 'async_trait>(
&'life0 self,
_logical_identifier: &'life1 str,
_data: CreateVerification,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn get_latest_verification_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn consume_verification_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn delete_verifications_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait { ... }
fn compare_and_swap_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_id: &'life1 str,
_expected_value: &'life2 str,
_value: &'life3 str,
_expires_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait { ... }
fn reserve_verification<'life0, 'async_trait>(
&'life0 self,
_verification: CreateVerification,
) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait { ... }
}Required Methods§
fn create_verification<'life0, 'async_trait>(
&'life0 self,
verification: CreateVerification,
) -> Pin<Box<dyn Future<Output = AuthResult<S::Verification>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_verification<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
identifier: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn get_verification_by_value<'life0, 'life1, 'async_trait>(
&'life0 self,
value: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_verification_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn consume_verification<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
identifier: &'life1 str,
value: &'life2 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn delete_verification<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_expired_verifications<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = AuthResult<usize>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Provided Methods§
Sourcefn create_verification_record<'life0, 'async_trait>(
&'life0 self,
_data: VerificationCreation,
_publication: VerificationPublication,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<VerificationSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_verification_record<'life0, 'async_trait>(
&'life0 self,
_data: VerificationCreation,
_publication: VerificationPublication,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<VerificationSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create through before hooks, optional physical persistence, secondary publication, then after hooks. Unsupported adapters must fail closed.
Sourcefn consume_verification_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn consume_verification_snapshot<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically remove the newest generation and all siblings, returning the actual winning snapshot even when expired. This keeps legacy fallback from resurrecting an older logical generation.
Sourcefn update_verification_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
_data: UpdateVerification,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<VerificationSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn update_verification_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
_data: UpdateVerification,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<VerificationSnapshot>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Update every physical match, with one actual adapter result snapshot.
Sourcefn reserve_verification_record<'life0, 'life1, 'async_trait>(
&'life0 self,
_logical_identifier: &'life1 str,
_data: CreateVerification,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reserve_verification_record<'life0, 'life1, 'async_trait>(
&'life0 self,
_logical_identifier: &'life1 str,
_data: CreateVerification,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reserve by the original logical identifier while storing its configured transformed identifier. Return the actual newly inserted model only.
Sourcefn get_latest_verification_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_latest_verification_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch the newest generation, including expired records. The caller decides whether cleanup and a distinct expiry error are required.
Sourcefn consume_verification_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn consume_verification_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<Option<S::Verification>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Atomically invalidate an identifier and return its newest generation.
Exactly one concurrent caller can receive a row. Expired records are
removed along with every sibling and return None.
fn delete_verifications_by_identifier<'life0, 'life1, 'async_trait>(
&'life0 self,
_identifier: &'life1 str,
) -> Pin<Box<dyn Future<Output = AuthResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Sourcefn compare_and_swap_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_id: &'life1 str,
_expected_value: &'life2 str,
_value: &'life3 str,
_expires_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn compare_and_swap_verification<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
_id: &'life1 str,
_expected_value: &'life2 str,
_value: &'life3 str,
_expires_at: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Update a generation only when its value still matches the snapshot.
Sourcefn reserve_verification<'life0, 'async_trait>(
&'life0 self,
_verification: CreateVerification,
) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn reserve_verification<'life0, 'async_trait>(
&'life0 self,
_verification: CreateVerification,
) -> Pin<Box<dyn Future<Output = AuthResult<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Insert a deterministic reservation exactly once. An expired marker remains reserved until it is cleaned up or explicitly consumed.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".