pub struct InMemoryEnrollmentStore { /* private fields */ }Implementations§
Trait Implementations§
Source§impl Default for InMemoryEnrollmentStore
impl Default for InMemoryEnrollmentStore
Source§impl EnrollmentStore for InMemoryEnrollmentStore
impl EnrollmentStore for InMemoryEnrollmentStore
Source§fn create<'life0, 'async_trait>(
&'life0 self,
record: EnrollmentRecord,
) -> Pin<Box<dyn Future<Output = Result<String, EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create<'life0, 'async_trait>(
&'life0 self,
record: EnrollmentRecord,
) -> Pin<Box<dyn Future<Output = Result<String, EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Create a new enrollment
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<EnrollmentRecord>, EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<EnrollmentRecord>, EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get a specific enrollment by ID
Source§fn is_enrolled<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tenant_id: &'life2 TenantId,
factor_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<bool, EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn is_enrolled<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tenant_id: &'life2 TenantId,
factor_id: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<bool, EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Check if user is enrolled in a specific factor
Source§fn list_by_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tenant_id: &'life2 TenantId,
) -> Pin<Box<dyn Future<Output = Result<Vec<EnrollmentRecord>, EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_by_user<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
tenant_id: &'life2 TenantId,
) -> Pin<Box<dyn Future<Output = Result<Vec<EnrollmentRecord>, EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
List all enrollments for a user
Source§fn update<'life0, 'async_trait>(
&'life0 self,
record: EnrollmentRecord,
) -> Pin<Box<dyn Future<Output = Result<(), EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn update<'life0, 'async_trait>(
&'life0 self,
record: EnrollmentRecord,
) -> Pin<Box<dyn Future<Output = Result<(), EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Update enrollment (e.g., status change, last_used)
Source§fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete/revoke an enrollment
Source§fn record_usage<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_usage<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), EnrollmentError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Record usage of a factor (increment counter, update timestamp)
Auto Trait Implementations§
impl !RefUnwindSafe for InMemoryEnrollmentStore
impl !UnwindSafe for InMemoryEnrollmentStore
impl Freeze for InMemoryEnrollmentStore
impl Send for InMemoryEnrollmentStore
impl Sync for InMemoryEnrollmentStore
impl Unpin for InMemoryEnrollmentStore
impl UnsafeUnpin for InMemoryEnrollmentStore
Blanket Implementations§
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