Skip to main content

MemoryDatabaseAdapter

Struct MemoryDatabaseAdapter 

Source
pub struct MemoryDatabaseAdapter<U = User, S = Session, A = Account, O = Organization, M = Member, I = Invitation, V = Verification, P = Passkey> { /* private fields */ }
Expand description

In-memory database adapter for testing and development.

Generic over entity types — use default type parameters for the built-in types, or supply your own custom structs that implement the Memory* traits.

// Using built-in types (no turbofish needed):
let adapter = MemoryDatabaseAdapter::new();

// Using custom types:
let adapter = MemoryDatabaseAdapter::<MyUser, MySession, MyAccount,
    MyOrg, MyMember, MyInvitation, MyVerification>::new();

Implementations§

Source§

impl MemoryDatabaseAdapter

Constructor for the default (built-in) entity types. Use Default::default() for custom type parameterizations.

Trait Implementations§

Source§

impl<U, S, A, O, M, I, V, P> AccountOps for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Source§

type Account = A

Source§

fn create_account<'life0, 'async_trait>( &'life0 self, create_account: CreateAccount, ) -> Pin<Box<dyn Future<Output = Result<A, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_account<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, provider: &'life1 str, provider_account_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<A>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_user_accounts<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<A>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn update_account<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateAccount, ) -> Pin<Box<dyn Future<Output = Result<A, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_account<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

impl<U, S, A, O, M, I, V, P> ApiKeyOps for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Source§

type ApiKey = ApiKey

Source§

fn create_api_key<'life0, 'async_trait>( &'life0 self, input: CreateApiKey, ) -> Pin<Box<dyn Future<Output = Result<ApiKey, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_api_key_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<ApiKey>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_api_key_by_hash<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<ApiKey>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn list_api_keys_by_user<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiKey>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn update_api_key<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateApiKey, ) -> Pin<Box<dyn Future<Output = Result<ApiKey, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_api_key<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_expired_api_keys<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Delete all API keys whose expires_at is in the past. Returns the count of deleted keys.
Source§

impl<U, S, A, O, M, I, V, P> Default for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Source§

fn default() -> MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Returns the “default value” for a type. Read more
Source§

impl<U, S, A, O, M, I, V, P> InvitationOps for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Source§

type Invitation = I

Source§

fn create_invitation<'life0, 'async_trait>( &'life0 self, create_inv: CreateInvitation, ) -> Pin<Box<dyn Future<Output = Result<I, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_invitation_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<I>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_pending_invitation<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, organization_id: &'life1 str, email: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<I>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn update_invitation_status<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, status: InvitationStatus, ) -> Pin<Box<dyn Future<Output = Result<I, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn list_organization_invitations<'life0, 'life1, 'async_trait>( &'life0 self, organization_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<I>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn list_user_invitations<'life0, 'life1, 'async_trait>( &'life0 self, email: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<I>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

impl<U, S, A, O, M, I, V, P> MemberOps for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Source§

type Member = M

Source§

fn create_member<'life0, 'async_trait>( &'life0 self, create_member: CreateMember, ) -> Pin<Box<dyn Future<Output = Result<M, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_member<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, organization_id: &'life1 str, user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<M>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_member_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<M>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn update_member_role<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, member_id: &'life1 str, role: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<M, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_member<'life0, 'life1, 'async_trait>( &'life0 self, member_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn list_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, organization_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<M>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn count_organization_members<'life0, 'life1, 'async_trait>( &'life0 self, organization_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<usize, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn count_organization_owners<'life0, 'life1, 'async_trait>( &'life0 self, organization_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<usize, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

impl<U, S, A, O, M, I, V, P> OrganizationOps for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Source§

type Organization = O

Source§

fn create_organization<'life0, 'async_trait>( &'life0 self, create_org: CreateOrganization, ) -> Pin<Box<dyn Future<Output = Result<O, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_organization_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<O>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_organization_by_slug<'life0, 'life1, 'async_trait>( &'life0 self, slug: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<O>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn update_organization<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateOrganization, ) -> Pin<Box<dyn Future<Output = Result<O, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_organization<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn list_user_organizations<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<O>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

impl<U, S, A, O, M, I, V, P> PasskeyOps for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Source§

type Passkey = P

Source§

fn create_passkey<'life0, 'async_trait>( &'life0 self, input: CreatePasskey, ) -> Pin<Box<dyn Future<Output = Result<P, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_passkey_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<P>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_passkey_by_credential_id<'life0, 'life1, 'async_trait>( &'life0 self, credential_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<P>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn list_passkeys_by_user<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<P>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn update_passkey_counter<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, counter: u64, ) -> Pin<Box<dyn Future<Output = Result<P, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn update_passkey_name<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, name: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<P, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_passkey<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

impl<U, S, A, O, M, I, V, P> SessionOps for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Source§

type Session = S

Source§

fn create_session<'life0, 'async_trait>( &'life0 self, create_session: CreateSession, ) -> Pin<Box<dyn Future<Output = Result<S, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_session<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<S>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_user_sessions<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<S>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn update_session_expiry<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, expires_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_session<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_user_sessions<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_expired_sessions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn update_session_active_organization<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, token: &'life1 str, organization_id: Option<&'life2 str>, ) -> Pin<Box<dyn Future<Output = Result<S, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

impl<U, S, A, O, M, I, V, P> TwoFactorOps for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Source§

type TwoFactor = TwoFactor

Source§

fn create_two_factor<'life0, 'async_trait>( &'life0 self, create: CreateTwoFactor, ) -> Pin<Box<dyn Future<Output = Result<TwoFactor, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_two_factor_by_user_id<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<TwoFactor>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn update_two_factor_backup_codes<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, user_id: &'life1 str, backup_codes: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<TwoFactor, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_two_factor<'life0, 'life1, 'async_trait>( &'life0 self, user_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

impl<U, S, A, O, M, I, V, P> UserOps for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Source§

type User = U

Source§

fn create_user<'life0, 'async_trait>( &'life0 self, create_user: CreateUser, ) -> Pin<Box<dyn Future<Output = Result<U, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_user_by_id<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<U>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_user_by_email<'life0, 'life1, 'async_trait>( &'life0 self, email: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<U>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_user_by_username<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<U>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn update_user<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, update: UpdateUser, ) -> Pin<Box<dyn Future<Output = Result<U, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_user<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn list_users<'life0, 'async_trait>( &'life0 self, params: ListUsersParams, ) -> Pin<Box<dyn Future<Output = Result<(Vec<U>, usize), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

List users with optional filtering, sorting, and pagination. Returns (users, total_count).
Source§

impl<U, S, A, O, M, I, V, P> VerificationOps for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Source§

type Verification = V

Source§

fn create_verification<'life0, 'async_trait>( &'life0 self, create_verification: CreateVerification, ) -> Pin<Box<dyn Future<Output = Result<V, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_verification<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, identifier: &'life1 str, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<V>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_verification_by_value<'life0, 'life1, 'async_trait>( &'life0 self, value: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<V>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn get_verification_by_identifier<'life0, 'life1, 'async_trait>( &'life0 self, identifier: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<V>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn consume_verification<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, identifier: &'life1 str, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<V>, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Atomically consume a verification token identified by (identifier, value). Read more
Source§

fn delete_verification<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Source§

fn delete_expired_verifications<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<usize, AuthError>> + Send + 'async_trait>>
where 'life0: 'async_trait, MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>: 'async_trait,

Auto Trait Implementations§

§

impl<U, S, A, O, M, I, V, P> Freeze for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

§

impl<U, S, A, O, M, I, V, P> RefUnwindSafe for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

§

impl<U, S, A, O, M, I, V, P> Send for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>
where U: Send, S: Send, A: Send, V: Send, O: Send, M: Send, I: Send, P: Send,

§

impl<U, S, A, O, M, I, V, P> Sync for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>
where U: Send, S: Send, A: Send, V: Send, O: Send, M: Send, I: Send, P: Send,

§

impl<U, S, A, O, M, I, V, P> Unpin for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

§

impl<U, S, A, O, M, I, V, P> UnsafeUnpin for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

§

impl<U, S, A, O, M, I, V, P> UnwindSafe for MemoryDatabaseAdapter<U, S, A, O, M, I, V, P>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> DatabaseAdapter for T