Struct mas_storage::MapErr

source ·
pub struct MapErr<R, F> { /* private fields */ }
Expand description

A wrapper which is used to map the error type of a repository to another

Implementations§

source§

impl<R, F> MapErr<R, F>

source

pub fn new(inner: R, mapper: F) -> Self

Create a new MapErr wrapper from an inner repository and a mapper function

Trait Implementations§

source§

impl<R, F, E> AppSessionRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn list<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: AppSessionFilter<'life1>, pagination: Pagination, ) -> Pin<Box<dyn Future<Output = Result<Page<AppSession>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List AppSession with the given filter and pagination Read more
source§

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: AppSessionFilter<'life1>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count the number of AppSession with the given filter Read more
source§

impl<R, F, E> BrowserSessionRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<BrowserSession>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup a [BrowserSession] by its ID Read more
source§

fn add<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, user: &'life3 User, user_agent: Option<UserAgent>, ) -> Pin<Box<dyn Future<Output = Result<BrowserSession, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Create a new [BrowserSession] for a [User] Read more
source§

fn finish<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, user_session: BrowserSession, ) -> Pin<Box<dyn Future<Output = Result<BrowserSession, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Finish a [BrowserSession] Read more
source§

fn finish_bulk<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, filter: BrowserSessionFilter<'life2>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Mark all the [BrowserSession] matching the given filter as finished Read more
source§

fn list<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: BrowserSessionFilter<'life1>, pagination: Pagination, ) -> Pin<Box<dyn Future<Output = Result<Page<BrowserSession>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List [BrowserSession] with the given filter and pagination Read more
source§

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: BrowserSessionFilter<'life1>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count the number of [BrowserSession] with the given filter Read more
source§

fn authenticate_with_password<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, user_session: &'life3 BrowserSession, user_password: &'life4 Password, ) -> Pin<Box<dyn Future<Output = Result<Authentication, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Authenticate a [BrowserSession] with the given [Password] Read more
source§

fn authenticate_with_upstream<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, user_session: &'life3 BrowserSession, upstream_oauth_session: &'life4 UpstreamOAuthAuthorizationSession, ) -> Pin<Box<dyn Future<Output = Result<Authentication, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Authenticate a [BrowserSession] with the given [UpstreamOAuthAuthorizationSession] Read more
source§

fn get_last_authentication<'life0, 'life1, 'async_trait>( &'life0 mut self, user_session: &'life1 BrowserSession, ) -> Pin<Box<dyn Future<Output = Result<Option<Authentication>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the last successful authentication for a [BrowserSession] Read more
source§

fn record_batch_activity<'life0, 'async_trait>( &'life0 mut self, activity: Vec<(Ulid, DateTime<Utc>, Option<IpAddr>)>, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Record a batch of [BrowserSession] activity Read more
source§

impl<R, F, E> CompatAccessTokenRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<CompatAccessToken>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup a compat access token by its ID Read more
source§

fn find_by_token<'life0, 'life1, 'async_trait>( &'life0 mut self, access_token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<CompatAccessToken>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find a compat access token by its token Read more
source§

fn add<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, compat_session: &'life3 CompatSession, token: String, expires_after: Option<Duration>, ) -> Pin<Box<dyn Future<Output = Result<CompatAccessToken, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Add a new compat access token to the database Read more
source§

fn expire<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, compat_access_token: CompatAccessToken, ) -> Pin<Box<dyn Future<Output = Result<CompatAccessToken, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Set the expiration time of the compat access token to now Read more
source§

impl<R, F, E> CompatRefreshTokenRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<CompatRefreshToken>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup a compat refresh token by its ID Read more
source§

fn find_by_token<'life0, 'life1, 'async_trait>( &'life0 mut self, refresh_token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<CompatRefreshToken>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find a compat refresh token by its token Read more
source§

fn add<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, compat_session: &'life3 CompatSession, compat_access_token: &'life4 CompatAccessToken, token: String, ) -> Pin<Box<dyn Future<Output = Result<CompatRefreshToken, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Add a new compat refresh token to the database Read more
source§

fn consume<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, compat_refresh_token: CompatRefreshToken, ) -> Pin<Box<dyn Future<Output = Result<CompatRefreshToken, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Consume a compat refresh token Read more
source§

impl<R, F, E> CompatSessionRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<CompatSession>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup a compat session by its ID Read more
source§

fn add<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, user: &'life3 User, device: Device, browser_session: Option<&'life4 BrowserSession>, is_synapse_admin: bool, ) -> Pin<Box<dyn Future<Output = Result<CompatSession, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Start a new compat session Read more
source§

fn finish<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, compat_session: CompatSession, ) -> Pin<Box<dyn Future<Output = Result<CompatSession, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

End a compat session Read more
source§

fn finish_bulk<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, filter: CompatSessionFilter<'life2>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Mark all the [CompatSession] matching the given filter as finished Read more
source§

fn list<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: CompatSessionFilter<'life1>, pagination: Pagination, ) -> Pin<Box<dyn Future<Output = Result<Page<(CompatSession, Option<CompatSsoLogin>)>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List [CompatSession] with the given filter and pagination Read more
source§

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: CompatSessionFilter<'life1>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count the number of [CompatSession] with the given filter Read more
source§

fn record_batch_activity<'life0, 'async_trait>( &'life0 mut self, activity: Vec<(Ulid, DateTime<Utc>, Option<IpAddr>)>, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Record a batch of [CompatSession] activity Read more
source§

fn record_user_agent<'life0, 'async_trait>( &'life0 mut self, compat_session: CompatSession, user_agent: UserAgent, ) -> Pin<Box<dyn Future<Output = Result<CompatSession, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Record the user agent of a compat session Read more
source§

impl<R, F, E> CompatSsoLoginRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<CompatSsoLogin>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup a compat SSO login by its ID Read more
source§

fn find_for_session<'life0, 'life1, 'async_trait>( &'life0 mut self, session: &'life1 CompatSession, ) -> Pin<Box<dyn Future<Output = Result<Option<CompatSsoLogin>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find a compat SSO login by its session Read more
source§

fn find_by_token<'life0, 'life1, 'async_trait>( &'life0 mut self, login_token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<CompatSsoLogin>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find a compat SSO login by its login token Read more
source§

fn add<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, login_token: String, redirect_uri: Url, ) -> Pin<Box<dyn Future<Output = Result<CompatSsoLogin, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Start a new compat SSO login token Read more
source§

fn fulfill<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, compat_sso_login: CompatSsoLogin, compat_session: &'life2 CompatSession, ) -> Pin<Box<dyn Future<Output = Result<CompatSsoLogin, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fulfill a compat SSO login by providing a compat session Read more
source§

fn exchange<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, compat_sso_login: CompatSsoLogin, ) -> Pin<Box<dyn Future<Output = Result<CompatSsoLogin, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark a compat SSO login as exchanged Read more
source§

fn list<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: CompatSsoLoginFilter<'life1>, pagination: Pagination, ) -> Pin<Box<dyn Future<Output = Result<Page<CompatSsoLogin>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List [CompatSsoLogin] with the given filter and pagination Read more
source§

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: CompatSsoLoginFilter<'life1>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count the number of [CompatSsoLogin] with the given filter Read more
source§

impl<R, F, E> JobRepository for MapErr<R, F>
where R: JobRepository, F: FnMut(<R as JobRepository>::Error) -> E + Send + Sync,

§

type Error = E

The error type returned by the repository.
source§

fn schedule_submission<'life0, 'async_trait>( &'life0 mut self, submission: JobSubmission, ) -> Pin<Box<dyn Future<Output = Result<JobId, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Schedule a job submission to be executed at a later time. Read more
source§

impl<R, F, E> OAuth2AccessTokenRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<AccessToken>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup an access token by its ID Read more
source§

fn find_by_token<'life0, 'life1, 'async_trait>( &'life0 mut self, access_token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AccessToken>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find an access token by its token Read more
source§

fn add<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, session: &'life3 Session, access_token: String, expires_after: Option<Duration>, ) -> Pin<Box<dyn Future<Output = Result<AccessToken, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Add a new access token to the database Read more
source§

fn revoke<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, access_token: AccessToken, ) -> Pin<Box<dyn Future<Output = Result<AccessToken, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Revoke an access token Read more
source§

fn cleanup_expired<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Cleanup expired access tokens Read more
source§

impl<R, F, E> OAuth2AuthorizationGrantRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn add<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, client: &'life3 Client, redirect_uri: Url, scope: Scope, code: Option<AuthorizationCode>, state: Option<String>, nonce: Option<String>, max_age: Option<NonZeroU32>, response_mode: ResponseMode, response_type_id_token: bool, requires_consent: bool, ) -> Pin<Box<dyn Future<Output = Result<AuthorizationGrant, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Create a new authorization grant Read more
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<AuthorizationGrant>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup an authorization grant by its ID Read more
source§

fn find_by_code<'life0, 'life1, 'async_trait>( &'life0 mut self, code: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<AuthorizationGrant>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find an authorization grant by its code Read more
source§

fn fulfill<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, session: &'life2 Session, authorization_grant: AuthorizationGrant, ) -> Pin<Box<dyn Future<Output = Result<AuthorizationGrant, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Fulfill an authorization grant, by giving the [Session] that it created Read more
source§

fn exchange<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, authorization_grant: AuthorizationGrant, ) -> Pin<Box<dyn Future<Output = Result<AuthorizationGrant, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark an authorization grant as exchanged Read more
Unset the requires_consent flag on an authorization grant Read more
source§

impl<R, F, E> OAuth2ClientRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<Client>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup an OAuth2 client by its ID Read more
source§

fn load_batch<'life0, 'async_trait>( &'life0 mut self, ids: BTreeSet<Ulid>, ) -> Pin<Box<dyn Future<Output = Result<BTreeMap<Ulid, Client>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Load a batch of OAuth2 clients by their IDs Read more
source§

fn add<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, redirect_uris: Vec<Url>, encrypted_client_secret: Option<String>, application_type: Option<ApplicationType>, grant_types: Vec<GrantType>, client_name: Option<String>, logo_uri: Option<Url>, client_uri: Option<Url>, policy_uri: Option<Url>, tos_uri: Option<Url>, jwks_uri: Option<Url>, jwks: Option<PublicJsonWebKeySet>, id_token_signed_response_alg: Option<JsonWebSignatureAlg>, userinfo_signed_response_alg: Option<JsonWebSignatureAlg>, token_endpoint_auth_method: Option<OAuthClientAuthenticationMethod>, token_endpoint_auth_signing_alg: Option<JsonWebSignatureAlg>, initiate_login_uri: Option<Url>, ) -> Pin<Box<dyn Future<Output = Result<Client, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Add a new OAuth2 client Read more
source§

fn upsert_static<'life0, 'async_trait>( &'life0 mut self, client_id: Ulid, client_auth_method: OAuthClientAuthenticationMethod, encrypted_client_secret: Option<String>, jwks: Option<PublicJsonWebKeySet>, jwks_uri: Option<Url>, redirect_uris: Vec<Url>, ) -> Pin<Box<dyn Future<Output = Result<Client, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Add or replace a static client Read more
source§

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

List all static clients Read more
source§

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

Delete a client Read more
source§

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

Delete a client by ID Read more
Get the list of scopes that the user has given consent for the given client Read more
Give consent for a set of scopes for the given client and user Read more
source§

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

Find an OAuth2 client by its client ID
source§

impl<R, F, E> OAuth2DeviceCodeGrantRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn add<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, params: OAuth2DeviceCodeGrantParams<'life3>, ) -> Pin<Box<dyn Future<Output = Result<DeviceCodeGrant, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Create a new device code grant Read more
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceCodeGrant>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup a device code grant by its ID Read more
source§

fn find_by_device_code<'life0, 'life1, 'async_trait>( &'life0 mut self, device_code: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceCodeGrant>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lookup a device code grant by its device code Read more
source§

fn find_by_user_code<'life0, 'life1, 'async_trait>( &'life0 mut self, user_code: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<DeviceCodeGrant>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lookup a device code grant by its user code Read more
source§

fn fulfill<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, device_code_grant: DeviceCodeGrant, browser_session: &'life2 BrowserSession, ) -> Pin<Box<dyn Future<Output = Result<DeviceCodeGrant, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Mark the device code grant as fulfilled with the given browser session Read more
source§

fn reject<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, device_code_grant: DeviceCodeGrant, browser_session: &'life2 BrowserSession, ) -> Pin<Box<dyn Future<Output = Result<DeviceCodeGrant, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Mark the device code grant as rejected with the given browser session Read more
source§

fn exchange<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, device_code_grant: DeviceCodeGrant, session: &'life2 Session, ) -> Pin<Box<dyn Future<Output = Result<DeviceCodeGrant, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Mark the device code grant as exchanged and store the session which was created Read more
source§

impl<R, F, E> OAuth2RefreshTokenRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<RefreshToken>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup a refresh token by its ID Read more
source§

fn find_by_token<'life0, 'life1, 'async_trait>( &'life0 mut self, refresh_token: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<RefreshToken>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find a refresh token by its token Read more
source§

fn add<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, session: &'life3 Session, access_token: &'life4 AccessToken, refresh_token: String, ) -> Pin<Box<dyn Future<Output = Result<RefreshToken, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Add a new refresh token to the database Read more
source§

fn consume<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, refresh_token: RefreshToken, ) -> Pin<Box<dyn Future<Output = Result<RefreshToken, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Consume a refresh token Read more
source§

impl<R, F, E> OAuth2SessionRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<Session>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup an [Session] by its ID Read more
source§

fn add<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, client: &'life3 Client, user: Option<&'life4 User>, user_session: Option<&'life5 BrowserSession>, scope: Scope, ) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait, 'life5: 'async_trait,

Create a new [Session] with the given parameters Read more
source§

fn add_from_browser_session<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, client: &'life3 Client, user_session: &'life4 BrowserSession, scope: Scope, ) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Create a new [Session] out of a [Client] and a [BrowserSession] Read more
source§

fn add_from_client_credentials<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, client: &'life3 Client, scope: Scope, ) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Create a new [Session] for a [Client] using the client credentials flow Read more
source§

fn finish<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, session: Session, ) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark a [Session] as finished Read more
source§

fn finish_bulk<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, filter: OAuth2SessionFilter<'life2>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Mark all the [Session] matching the given filter as finished Read more
source§

fn list<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: OAuth2SessionFilter<'life1>, pagination: Pagination, ) -> Pin<Box<dyn Future<Output = Result<Page<Session>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List [Session]s matching the given filter and pagination parameters Read more
source§

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: OAuth2SessionFilter<'life1>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count [Session]s matching the given filter Read more
source§

fn record_batch_activity<'life0, 'async_trait>( &'life0 mut self, activity: Vec<(Ulid, DateTime<Utc>, Option<IpAddr>)>, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Record a batch of [Session] activity Read more
source§

fn record_user_agent<'life0, 'async_trait>( &'life0 mut self, session: Session, user_agent: UserAgent, ) -> Pin<Box<dyn Future<Output = Result<Session, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Record the user agent of a [Session] Read more
source§

impl<R, F, E> RepositoryAccess for MapErr<R, F>
where R: RepositoryAccess, R::Error: 'static, F: FnMut(R::Error) -> E + Send + Sync + 'static, E: Error + Send + Sync + 'static,

§

type Error = E

The backend-specific error type used by each repository.
source§

fn upstream_oauth_provider<'c>( &'c mut self, ) -> Box<dyn UpstreamOAuthProviderRepository<Error = Self::Error> + 'c>

source§

fn upstream_oauth_session<'c>( &'c mut self, ) -> Box<dyn UpstreamOAuthSessionRepository<Error = Self::Error> + 'c>

source§

fn user<'c>(&'c mut self) -> Box<dyn UserRepository<Error = Self::Error> + 'c>

source§

fn user_email<'c>( &'c mut self, ) -> Box<dyn UserEmailRepository<Error = Self::Error> + 'c>

source§

fn user_password<'c>( &'c mut self, ) -> Box<dyn UserPasswordRepository<Error = Self::Error> + 'c>

source§

fn user_recovery<'c>( &'c mut self, ) -> Box<dyn UserRecoveryRepository<Error = Self::Error> + 'c>

source§

fn user_terms<'c>( &'c mut self, ) -> Box<dyn UserTermsRepository<Error = Self::Error> + 'c>

source§

fn browser_session<'c>( &'c mut self, ) -> Box<dyn BrowserSessionRepository<Error = Self::Error> + 'c>

source§

fn app_session<'c>( &'c mut self, ) -> Box<dyn AppSessionRepository<Error = Self::Error> + 'c>

source§

fn oauth2_client<'c>( &'c mut self, ) -> Box<dyn OAuth2ClientRepository<Error = Self::Error> + 'c>

source§

fn oauth2_authorization_grant<'c>( &'c mut self, ) -> Box<dyn OAuth2AuthorizationGrantRepository<Error = Self::Error> + 'c>

source§

fn oauth2_session<'c>( &'c mut self, ) -> Box<dyn OAuth2SessionRepository<Error = Self::Error> + 'c>

source§

fn oauth2_access_token<'c>( &'c mut self, ) -> Box<dyn OAuth2AccessTokenRepository<Error = Self::Error> + 'c>

source§

fn oauth2_refresh_token<'c>( &'c mut self, ) -> Box<dyn OAuth2RefreshTokenRepository<Error = Self::Error> + 'c>

source§

fn oauth2_device_code_grant<'c>( &'c mut self, ) -> Box<dyn OAuth2DeviceCodeGrantRepository<Error = Self::Error> + 'c>

source§

fn compat_session<'c>( &'c mut self, ) -> Box<dyn CompatSessionRepository<Error = Self::Error> + 'c>

source§

fn compat_sso_login<'c>( &'c mut self, ) -> Box<dyn CompatSsoLoginRepository<Error = Self::Error> + 'c>

source§

fn compat_access_token<'c>( &'c mut self, ) -> Box<dyn CompatAccessTokenRepository<Error = Self::Error> + 'c>

source§

fn compat_refresh_token<'c>( &'c mut self, ) -> Box<dyn CompatRefreshTokenRepository<Error = Self::Error> + 'c>

source§

fn job<'c>(&'c mut self) -> Box<dyn JobRepository<Error = Self::Error> + 'c>

source§

impl<R, F, E> RepositoryTransaction for MapErr<R, F>
where R: RepositoryTransaction, R::Error: 'static, F: FnMut(R::Error) -> E + Send + Sync + 'static, E: Error,

§

type Error = E

The error type used by the Self::save and Self::cancel functions
source§

fn save(self: Box<Self>) -> BoxFuture<'static, Result<(), Self::Error>>

Commit the transaction Read more
source§

fn cancel(self: Box<Self>) -> BoxFuture<'static, Result<(), Self::Error>>

Rollback the transaction Read more
source§

impl<R, F, E> UpstreamOAuthLinkRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<UpstreamOAuthLink>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup an upstream OAuth link by its ID Read more
source§

fn find_by_subject<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, upstream_oauth_provider: &'life1 UpstreamOAuthProvider, subject: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Option<UpstreamOAuthLink>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Find an upstream OAuth link for a provider by its subject Read more
source§

fn add<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, upstream_oauth_provider: &'life3 UpstreamOAuthProvider, subject: String, ) -> Pin<Box<dyn Future<Output = Result<UpstreamOAuthLink, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Add a new upstream OAuth link Read more
source§

fn associate_to_user<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, upstream_oauth_link: &'life1 UpstreamOAuthLink, user: &'life2 User, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Associate an upstream OAuth link to a user Read more
source§

fn list<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: UpstreamOAuthLinkFilter<'life1>, pagination: Pagination, ) -> Pin<Box<dyn Future<Output = Result<Page<UpstreamOAuthLink>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List [UpstreamOAuthLink] with the given filter and pagination Read more
source§

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: UpstreamOAuthLinkFilter<'life1>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count the number of [UpstreamOAuthLink] with the given filter Read more
source§

impl<R, F, E> UpstreamOAuthProviderRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<UpstreamOAuthProvider>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup an upstream OAuth provider by its ID Read more
source§

fn add<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, params: UpstreamOAuthProviderParams, ) -> Pin<Box<dyn Future<Output = Result<UpstreamOAuthProvider, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Add a new upstream OAuth provider Read more
source§

fn upsert<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, id: Ulid, params: UpstreamOAuthProviderParams, ) -> Pin<Box<dyn Future<Output = Result<UpstreamOAuthProvider, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Insert or update an upstream OAuth provider Read more
source§

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

Delete an upstream OAuth provider Read more
source§

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

Delete an upstream OAuth provider by its ID Read more
source§

fn disable<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, provider: UpstreamOAuthProvider, ) -> Pin<Box<dyn Future<Output = Result<UpstreamOAuthProvider, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Disable an upstream OAuth provider Read more
source§

fn list<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: UpstreamOAuthProviderFilter<'life1>, pagination: Pagination, ) -> Pin<Box<dyn Future<Output = Result<Page<UpstreamOAuthProvider>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List [UpstreamOAuthProvider] with the given filter and pagination Read more
source§

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: UpstreamOAuthProviderFilter<'life1>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count the number of [UpstreamOAuthProvider] with the given filter Read more
source§

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

Get all enabled upstream OAuth providers Read more
source§

impl<R, F, E> UpstreamOAuthSessionRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<UpstreamOAuthAuthorizationSession>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup a session by its ID Read more
source§

fn add<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, upstream_oauth_provider: &'life3 UpstreamOAuthProvider, state: String, code_challenge_verifier: Option<String>, nonce: String, ) -> Pin<Box<dyn Future<Output = Result<UpstreamOAuthAuthorizationSession, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Add a session to the database Read more
Mark a session as completed and associate the given link Read more
source§

fn consume<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, upstream_oauth_authorization_session: UpstreamOAuthAuthorizationSession, ) -> Pin<Box<dyn Future<Output = Result<UpstreamOAuthAuthorizationSession, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark a session as consumed Read more
source§

impl<R, F, E> UserEmailRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<UserEmail>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup an [UserEmail] by its ID Read more
source§

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

Lookup an [UserEmail] by its email address for a [User] Read more
source§

fn get_primary<'life0, 'life1, 'async_trait>( &'life0 mut self, user: &'life1 User, ) -> Pin<Box<dyn Future<Output = Result<Option<UserEmail>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the primary [UserEmail] of a [User] Read more
source§

fn all<'life0, 'life1, 'async_trait>( &'life0 mut self, user: &'life1 User, ) -> Pin<Box<dyn Future<Output = Result<Vec<UserEmail>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get all [UserEmail] of a [User] Read more
source§

fn list<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: UserEmailFilter<'life1>, pagination: Pagination, ) -> Pin<Box<dyn Future<Output = Result<Page<UserEmail>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List [UserEmail] with the given filter and pagination Read more
source§

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: UserEmailFilter<'life1>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count the [UserEmail] with the given filter Read more
source§

fn add<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, user: &'life3 User, email: String, ) -> Pin<Box<dyn Future<Output = Result<UserEmail, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Create a new [UserEmail] for a [User] Read more
source§

fn remove<'life0, 'async_trait>( &'life0 mut self, user_email: UserEmail, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Delete a [UserEmail] Read more
source§

fn mark_as_verified<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, user_email: UserEmail, ) -> Pin<Box<dyn Future<Output = Result<UserEmail, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark a [UserEmail] as verified Read more
source§

fn set_as_primary<'life0, 'life1, 'async_trait>( &'life0 mut self, user_email: &'life1 UserEmail, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Mark a [UserEmail] as primary Read more
source§

fn add_verification_code<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, user_email: &'life3 UserEmail, max_age: Duration, code: String, ) -> Pin<Box<dyn Future<Output = Result<UserEmailVerification, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Add a [UserEmailVerification] for a [UserEmail] Read more
source§

fn find_verification_code<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, user_email: &'life2 UserEmail, code: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<Option<UserEmailVerification>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Find a [UserEmailVerification] for a [UserEmail] by its code Read more
source§

fn consume_verification_code<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, verification: UserEmailVerification, ) -> Pin<Box<dyn Future<Output = Result<UserEmailVerification, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Consume a [UserEmailVerification] Read more
source§

impl<R, F, E> UserPasswordRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn active<'life0, 'life1, 'async_trait>( &'life0 mut self, user: &'life1 User, ) -> Pin<Box<dyn Future<Output = Result<Option<Password>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Get the active password for a user Read more
source§

fn add<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, user: &'life3 User, version: u16, hashed_password: String, upgraded_from: Option<&'life4 Password>, ) -> Pin<Box<dyn Future<Output = Result<Password, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Set a new password for a user Read more
source§

impl<R, F, E> UserRecoveryRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn lookup_session<'life0, 'async_trait>( &'life0 mut self, id: Ulid, ) -> Pin<Box<dyn Future<Output = Result<Option<UserRecoverySession>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup an [UserRecoverySession] by its ID Read more
source§

fn add_session<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, email: String, user_agent: UserAgent, ip_address: Option<IpAddr>, locale: String, ) -> Pin<Box<dyn Future<Output = Result<UserRecoverySession, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Create a new [UserRecoverySession] for the given email Read more
source§

fn find_ticket<'life0, 'life1, 'async_trait>( &'life0 mut self, ticket: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<UserRecoveryTicket>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find a [UserRecoveryTicket] by its ticket Read more
source§

fn add_ticket<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, user_recovery_session: &'life3 UserRecoverySession, user_email: &'life4 UserEmail, ticket: String, ) -> Pin<Box<dyn Future<Output = Result<UserRecoveryTicket, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Add a [UserRecoveryTicket] to the given [UserRecoverySession] for the given [UserEmail] Read more
source§

fn consume_ticket<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, user_recovery_ticket: UserRecoveryTicket, user_recovery_session: UserRecoverySession, ) -> Pin<Box<dyn Future<Output = Result<UserRecoverySession, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Consume a [UserRecoveryTicket] and mark the session as used Read more
source§

impl<R, F, E> UserRepository for MapErr<R, F>
where R: UserRepository, F: FnMut(<R as UserRepository>::Error) -> E + Send + Sync,

§

type Error = E

The error type returned by the repository
source§

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

Lookup a [User] by its ID Read more
source§

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

Find a [User] by its username Read more
source§

fn add<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, username: String, ) -> Pin<Box<dyn Future<Output = Result<User, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Create a new [User] Read more
source§

fn exists<'life0, 'life1, 'async_trait>( &'life0 mut self, username: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<bool, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Check if a [User] exists Read more
source§

fn lock<'life0, 'life1, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, user: User, ) -> Pin<Box<dyn Future<Output = Result<User, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lock a [User] Read more
source§

fn unlock<'life0, 'async_trait>( &'life0 mut self, user: User, ) -> Pin<Box<dyn Future<Output = Result<User, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Unlock a [User] Read more
source§

fn set_can_request_admin<'life0, 'async_trait>( &'life0 mut self, user: User, can_request_admin: bool, ) -> Pin<Box<dyn Future<Output = Result<User, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set whether a [User] can request admin Read more
source§

fn list<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: UserFilter<'life1>, pagination: Pagination, ) -> Pin<Box<dyn Future<Output = Result<Page<User>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

List [User] with the given filter and pagination Read more
source§

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: UserFilter<'life1>, ) -> Pin<Box<dyn Future<Output = Result<usize, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Count the [User] with the given filter Read more
source§

fn acquire_lock_for_sync<'life0, 'life1, 'async_trait>( &'life0 mut self, user: &'life1 User, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Acquire a lock on the user to make sure device operations are done in a sequential way. The lock is released when the repository is saved or rolled back. Read more
source§

impl<R, F, E> UserTermsRepository for MapErr<R, F>

§

type Error = E

The error type returned by the repository
source§

fn accept_terms<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, user: &'life3 User, terms_url: Url, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Accept the terms of service by a [User] Read more
source§

impl<R, F, E1, E2> Repository<E2> for MapErr<R, F>
where R: Repository<E1> + RepositoryAccess<Error = E1> + RepositoryTransaction<Error = E1>, F: FnMut(E1) -> E2 + Send + Sync + 'static, E1: Error + Send + Sync + 'static, E2: Error + Send + Sync + 'static,

Auto Trait Implementations§

§

impl<R, F> Freeze for MapErr<R, F>
where R: Freeze, F: Freeze,

§

impl<R, F> RefUnwindSafe for MapErr<R, F>

§

impl<R, F> Send for MapErr<R, F>
where R: Send, F: Send,

§

impl<R, F> Sync for MapErr<R, F>
where R: Sync, F: Sync,

§

impl<R, F> Unpin for MapErr<R, F>
where R: Unpin, F: Unpin,

§

impl<R, F> UnwindSafe for MapErr<R, F>
where R: UnwindSafe, F: UnwindSafe,

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> FutureExt for T

source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
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> JobRepositoryExt for T
where T: JobRepository + ?Sized,

§

type Error = <T as JobRepository>::Error

The error type returned by the repository.
source§

fn schedule_job<'life0, 'async_trait, J>( &'life0 mut self, job: J, ) -> Pin<Box<dyn Future<Output = Result<JobId, <T as JobRepositoryExt>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, J: 'async_trait + Job + Serialize + Send, T: 'async_trait,

Schedule a job to be executed at a later time. Read more
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

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

§

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>,

§

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