Skip to main content

MemoryStore

Struct MemoryStore 

Source
pub struct MemoryStore { /* private fields */ }

Implementations§

Source§

impl MemoryStore

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl ApiKeyRepository for MemoryStore

Source§

fn create<'life0, 'async_trait>( &'life0 self, data: CreateApiKey, ) -> Pin<Box<dyn Future<Output = Result<ApiKey>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_hash<'life0, 'life1, 'async_trait>( &'life0 self, key_hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<ApiKey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn find_by_user<'life0, 'async_trait>( &'life0 self, user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<ApiKey>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn revoke<'life0, 'async_trait>( &'life0 self, key_id: Uuid, user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn touch_last_used<'life0, 'async_trait>( &'life0 self, key_id: Uuid, at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl AuditLogRepository for MemoryStore

Source§

fn append<'life0, 'async_trait>( &'life0 self, entry: CreateAuditLog, ) -> Pin<Box<dyn Future<Output = Result<AuditLog>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_user<'life0, 'async_trait>( &'life0 self, user_id: Uuid, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<AuditLog>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_org<'life0, 'async_trait>( &'life0 self, org_id: Uuid, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<AuditLog>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl AuthorizationCodeRepository for MemoryStore

Source§

fn create<'life0, 'async_trait>( &'life0 self, data: CreateAuthorizationCode, ) -> Pin<Box<dyn Future<Output = Result<AuthorizationCode>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_code_hash<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AuthorizationCode>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn mark_used<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete_expired<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl Clone for MemoryStore

Source§

fn clone(&self) -> MemoryStore

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CredentialRepository for MemoryStore

Source§

fn create<'life0, 'async_trait>( &'life0 self, data: CreateCredential, ) -> Pin<Box<dyn Future<Output = Result<Credential>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_password_hash<'life0, 'async_trait>( &'life0 self, user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<String>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_user_and_kind<'life0, 'async_trait>( &'life0 self, user_id: Uuid, kind: CredentialKind, ) -> Pin<Box<dyn Future<Output = Result<Option<Credential>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete_by_user_and_kind<'life0, 'async_trait>( &'life0 self, user_id: Uuid, kind: CredentialKind, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl Default for MemoryStore

Source§

fn default() -> MemoryStore

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

impl DeviceCodeRepository for MemoryStore

Source§

fn create<'life0, 'async_trait>( &'life0 self, data: CreateDeviceCode, ) -> Pin<Box<dyn Future<Output = Result<DeviceCode>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_device_code_hash<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceCode>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn find_by_user_code_hash<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceCode>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn authorize<'life0, 'async_trait>( &'life0 self, id: Uuid, user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn deny<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn update_last_polled<'life0, 'async_trait>( &'life0 self, id: Uuid, interval_secs: u32, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete_expired<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn list_by_client<'life0, 'life1, 'async_trait>( &'life0 self, client_id: &'life1 str, offset: u32, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<DeviceCode>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl InviteRepository for MemoryStore

Source§

fn create<'life0, 'async_trait>( &'life0 self, data: CreateInvite, ) -> Pin<Box<dyn Future<Output = Result<Invite>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_token_hash<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Invite>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn accept<'life0, 'async_trait>( &'life0 self, invite_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Invite>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete_expired<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl OAuthAccountRepository for MemoryStore

Source§

fn upsert<'life0, 'async_trait>( &'life0 self, data: UpsertOAuthAccount, ) -> Pin<Box<dyn Future<Output = Result<OAuthAccount>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_provider<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, provider: &'life1 str, provider_user_id: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<OAuthAccount>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn find_by_user<'life0, 'async_trait>( &'life0 self, user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<OAuthAccount>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl OidcClientRepository for MemoryStore

Source§

fn create<'life0, 'async_trait>( &'life0 self, data: CreateOidcClient, ) -> Pin<Box<dyn Future<Output = Result<OidcClient>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_client_id<'life0, 'life1, 'async_trait>( &'life0 self, client_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<OidcClient>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list<'life0, 'async_trait>( &'life0 self, offset: u32, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<OidcClient>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl OidcFederationProviderRepository for MemoryStore

Source§

fn create<'life0, 'async_trait>( &'life0 self, data: CreateOidcFederationProvider, ) -> Pin<Box<dyn Future<Output = Result<OidcFederationProvider>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_id<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<OidcFederationProvider>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_name<'life0, 'life1, 'async_trait>( &'life0 self, name: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<OidcFederationProvider>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list_enabled<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<Vec<OidcFederationProvider>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl OidcTokenRepository for MemoryStore

Source§

fn create<'life0, 'async_trait>( &'life0 self, data: CreateOidcToken, ) -> Pin<Box<dyn Future<Output = Result<OidcToken>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_token_hash<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<OidcToken>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn revoke<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn revoke_all_for_user_client<'life0, 'life1, 'async_trait>( &'life0 self, user_id: Uuid, client_id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl OrgRepository for MemoryStore

Source§

fn create<'life0, 'async_trait>( &'life0 self, data: CreateOrg, ) -> Pin<Box<dyn Future<Output = Result<Organization>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_id<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<Organization>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_slug<'life0, 'life1, 'async_trait>( &'life0 self, slug: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Organization>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn add_member<'life0, 'async_trait>( &'life0 self, org_id: Uuid, user_id: Uuid, role_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Membership>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn remove_member<'life0, 'async_trait>( &'life0 self, org_id: Uuid, user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_members<'life0, 'async_trait>( &'life0 self, org_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<Membership>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_roles<'life0, 'async_trait>( &'life0 self, org_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<Role>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn create_role<'life0, 'async_trait>( &'life0 self, org_id: Uuid, name: String, permissions: Vec<String>, ) -> Pin<Box<dyn Future<Output = Result<Role>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn update_member_role<'life0, 'async_trait>( &'life0 self, org_id: Uuid, user_id: Uuid, role_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Membership>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl SessionRepository for MemoryStore

Source§

fn create<'life0, 'async_trait>( &'life0 self, data: CreateSession, ) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_token_hash<'life0, 'life1, 'async_trait>( &'life0 self, hash: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn find_by_user<'life0, 'async_trait>( &'life0 self, user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Vec<Session>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn invalidate<'life0, 'async_trait>( &'life0 self, session_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn invalidate_all_for_user<'life0, 'async_trait>( &'life0 self, user_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn set_org<'life0, 'async_trait>( &'life0 self, session_id: Uuid, org_id: Option<Uuid>, ) -> Pin<Box<dyn Future<Output = Result<Session>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

impl UserRepository for MemoryStore

Source§

fn find_by_id<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<Option<User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_by_email<'life0, 'life1, 'async_trait>( &'life0 self, email: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn find_by_username<'life0, 'life1, 'async_trait>( &'life0 self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn list<'life0, 'async_trait>( &'life0 self, offset: u32, limit: u32, ) -> Pin<Box<dyn Future<Output = Result<Vec<User>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn create<'life0, 'async_trait>( &'life0 self, data: CreateUser, ) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn update<'life0, 'async_trait>( &'life0 self, id: Uuid, data: UpdateUser, ) -> Pin<Box<dyn Future<Output = Result<User>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete<'life0, 'async_trait>( &'life0 self, id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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> StorageAdapter for T