Skip to main content

MapErr

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

Source§

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§

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

Finishes any application sessions that are using the specified device’s ID. Read more
Source§

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

Source§

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<String>, ) -> 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§

fn cleanup_finished<'life0, 'async_trait>( &'life0 mut self, since: Option<DateTime<Utc>>, until: DateTime<Utc>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<DateTime<Utc>>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup finished [BrowserSession]s Read more
Source§

fn cleanup_inactive_ips<'life0, 'async_trait>( &'life0 mut self, since: Option<DateTime<Utc>>, threshold: DateTime<Utc>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<DateTime<Utc>>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Clear IP addresses from sessions inactive since the threshold Read more
Source§

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

Source§

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>

Source§

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_and_replace<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, compat_refresh_token: CompatRefreshToken, successor_compat_refresh_token: &'life2 CompatRefreshToken, ) -> 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,

Consume the given compat refresh token, as well as all other refresh tokens from the same session, except for the given successor compat refresh token. Read more
Source§

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

Source§

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, human_name: Option<String>, ) -> 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: String, ) -> 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§

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

Set the human name of a compat session Read more
Source§

fn cleanup_finished<'life0, 'async_trait>( &'life0 mut self, since: Option<DateTime<Utc>>, until: DateTime<Utc>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<DateTime<Utc>>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup finished [CompatSession]s and their associated tokens. Read more
Source§

fn cleanup_inactive_ips<'life0, 'async_trait>( &'life0 mut self, since: Option<DateTime<Utc>>, threshold: DateTime<Utc>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<DateTime<Utc>>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Clear IP addresses from sessions inactive since the threshold Read more
Source§

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

Source§

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, browser_session: &'life2 BrowserSession, ) -> 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 browser session Read more
Source§

fn exchange<'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,

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> OAuth2AccessTokenRepository for MapErr<R, F>

Source§

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

Mark the access token as used, to track when it was first used Read more
Source§

fn cleanup_revoked<'life0, 'async_trait>( &'life0 mut self, since: Option<DateTime<Utc>>, until: DateTime<Utc>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<DateTime<Utc>>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup revoked access tokens Read more
Source§

fn cleanup_expired<'life0, 'async_trait>( &'life0 mut self, since: Option<DateTime<Utc>>, until: DateTime<Utc>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<DateTime<Utc>>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup expired access tokens Read more
Source§

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

Source§

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>, response_mode: ResponseMode, response_type_id_token: bool, login_hint: Option<String>, locale: Option<String>, ) -> 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
Source§

fn cleanup<'life0, 'async_trait>( &'life0 mut self, since: Option<Ulid>, until: Ulid, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<Ulid>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup old authorization grants Read more
Source§

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

Source§

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 OAuth client by its ID Read more
Source§

fn find_by_metadata_digest<'life0, 'life1, 'async_trait>( &'life0 mut self, digest: &'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 OAuth client by its metadata digest 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 OAuth 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>, metadata_digest: Option<String>, 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 OAuth client Read more
Source§

fn upsert_static<'life0, 'async_trait>( &'life0 mut self, client_id: Ulid, client_name: Option<String>, 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
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 OAuth client by its client ID
Source§

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

Source§

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§

fn cleanup<'life0, 'async_trait>( &'life0 mut self, since: Option<Ulid>, until: Ulid, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<Ulid>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup old device code grants Read more
Source§

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

Source§

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, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, refresh_token: RefreshToken, replaced_by: &'life2 RefreshToken, ) -> 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,

Consume a refresh token Read more
Source§

fn revoke<'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,

Revoke a refresh token Read more
Source§

fn cleanup_revoked<'life0, 'async_trait>( &'life0 mut self, since: Option<DateTime<Utc>>, until: DateTime<Utc>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<DateTime<Utc>>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup revoked refresh tokens that were revoked before a certain time Read more
Source§

fn cleanup_consumed<'life0, 'async_trait>( &'life0 mut self, since: Option<DateTime<Utc>>, until: DateTime<Utc>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<DateTime<Utc>>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup consumed refresh tokens that were consumed before a certain time Read more
Source§

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

Source§

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: String, ) -> 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§

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

Set the human name of a [Session] Read more
Source§

fn cleanup_finished<'life0, 'async_trait>( &'life0 mut self, since: Option<DateTime<Utc>>, until: DateTime<Utc>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<DateTime<Utc>>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup finished [Session]s Read more
Source§

fn cleanup_inactive_ips<'life0, 'async_trait>( &'life0 mut self, since: Option<DateTime<Utc>>, threshold: DateTime<Utc>, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<DateTime<Utc>>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Clear IP addresses from sessions inactive since the threshold Read more
Source§

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

Source§

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<PersonalAccessToken>, 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<PersonalAccessToken>, 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 find_active_for_session<'life0, 'life1, 'async_trait>( &'life0 mut self, session: &'life1 PersonalSession, ) -> Pin<Box<dyn Future<Output = Result<Option<PersonalAccessToken>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Find the active access token belonging to a given session. 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 PersonalSession, access_token: &'life4 str, expires_after: Option<Duration>, ) -> Pin<Box<dyn Future<Output = Result<PersonalAccessToken, 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 access token to the database Read more
Source§

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

Revoke an access token Read more
Source§

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

Source§

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<PersonalSession>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup a Personal 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, owner: PersonalSessionOwner, actor_user: &'life3 User, human_name: String, scope: Scope, ) -> Pin<Box<dyn Future<Output = Result<PersonalSession, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Start a new Personal session Read more
Source§

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

End a Personal session Read more
Source§

fn revoke_bulk<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, filter: PersonalSessionFilter<'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,

Revoke all the [PersonalSession]s matching the given filter. Read more
Source§

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

List [PersonalSession]s matching the given filter and pagination parameters Read more
Source§

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

Count [PersonalSession]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 [PersonalSession] activity Read more
Source§

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

Source§

type Error = E

The error type returned by the repository
Source§

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

Get the latest policy data Read more
Source§

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

Set the latest policy data Read more
Source§

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

Prune old policy data Read more
Source§

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

Source§

type Error = E

The error type returned by the repository.
Source§

fn schedule<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, queue_name: &'life3 str, payload: Value, metadata: Value, ) -> 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,

Schedule a job to be executed as soon as possible by a worker. Read more
Source§

fn schedule_later<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, queue_name: &'life3 str, payload: Value, metadata: Value, scheduled_at: DateTime<Utc>, schedule_name: Option<&'life4 str>, ) -> 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, 'life4: 'async_trait,

Schedule a job to be executed at a later date by a worker. Read more
Source§

fn reserve<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, worker: &'life2 Worker, queues: &'life3 [&'life4 str], count: usize, ) -> Pin<Box<dyn Future<Output = Result<Vec<Job>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Reserve multiple jobs from multiple queues Read more
Source§

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

Mark a job as completed Read more
Source§

fn mark_as_failed<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, id: Ulid, reason: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Marks a job as failed. Read more
Source§

fn retry<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, id: Ulid, delay: Duration, ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Retry a job. Read more
Source§

fn schedule_available_jobs<'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,

Mark all scheduled jobs past their scheduled date as available to be executed. Read more
Source§

fn cleanup<'life0, 'async_trait>( &'life0 mut self, since: Option<Ulid>, until: Ulid, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<Ulid>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup old completed and failed jobs Read more
Source§

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

Source§

type Error = E

The error type returned by the repository.
Source§

fn setup<'life0, 'life1, 'async_trait>( &'life0 mut self, schedules: &'life1 [&'static str], ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Setup the list of schedules in the repository Read more
Source§

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

List the schedules in the repository, with the last time they were run Read more
Source§

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

Source§

type Error = E

The error type returned by the repository.
Source§

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

Register a new worker. Read more
Source§

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

Send a heartbeat for the given worker. Read more
Source§

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

Mark the given worker as shutdown. Read more
Source§

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

Find dead workers and shut them down. Read more
Source§

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

Remove the leader lease if it is expired, sending a notification to trigger a new leader election. Read more
Source§

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

Try to get the leader lease, renewing it if we already have it 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,

Source§

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_registration<'c>( &'c mut self, ) -> Box<dyn UserRegistrationRepository<Error = Self::Error> + 'c>

Source§

fn user_registration_token<'c>( &'c mut self, ) -> Box<dyn UserRegistrationTokenRepository<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 personal_access_token<'c>( &'c mut self, ) -> Box<dyn PersonalAccessTokenRepository<Error = Self::Error> + 'c>

Source§

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

Source§

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

Source§

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

Source§

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

Source§

fn policy_data<'c>( &'c mut self, ) -> Box<dyn PolicyDataRepository<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,

Source§

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>

Source§

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, human_account_name: Option<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§

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

Delete a [UpstreamOAuthLink] Read more
Source§

fn cleanup_orphaned<'life0, 'async_trait>( &'life0 mut self, since: Option<Ulid>, until: Ulid, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<Ulid>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup orphaned upstream OAuth links Read more
Source§

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

Source§

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>

Source§

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: Option<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, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, upstream_oauth_authorization_session: UpstreamOAuthAuthorizationSession, browser_session: &'life2 BrowserSession, ) -> 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,

Mark a session as consumed Read more
Source§

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

List [UpstreamOAuthAuthorizationSession] with the given filter and pagination Read more
Source§

fn count<'life0, 'life1, 'async_trait>( &'life0 mut self, filter: UpstreamOAuthSessionFilter<'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 [UpstreamOAuthAuthorizationSession] with the given filter Read more
Source§

fn cleanup_orphaned<'life0, 'async_trait>( &'life0 mut self, since: Option<Ulid>, until: Ulid, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<Ulid>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup old authorization sessions that are not linked to a user session Read more
Source§

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

Source§

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 find_by_email<'life0, 'life1, 'async_trait>( &'life0 mut self, email: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<UserEmail>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Lookup an [UserEmail] by its email address 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 remove_bulk<'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,

Delete all [UserEmail] with the given filter Read more
Source§

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

Add a new [UserEmailAuthentication] for a [BrowserSession] Read more
Source§

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

Add a new [UserEmailAuthentication] for a [UserRegistration] Read more
Source§

fn add_authentication_code<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, duration: Duration, authentication: &'life3 UserEmailAuthentication, code: String, ) -> Pin<Box<dyn Future<Output = Result<UserEmailAuthenticationCode, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Add a new [UserEmailAuthenticationCode] for a [UserEmailAuthentication] Read more
Source§

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

Lookup a [UserEmailAuthentication] Read more
Source§

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

Find a [UserEmailAuthenticationCode] by its code and session Read more
Source§

fn complete_authentication_with_code<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, clock: &'life1 dyn Clock, authentication: UserEmailAuthentication, code: &'life2 UserEmailAuthenticationCode, ) -> Pin<Box<dyn Future<Output = Result<UserEmailAuthentication, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Complete a [UserEmailAuthentication] by using the given code Read more
Source§

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

Complete a [UserEmailAuthentication] by using the given upstream oauth authorization session Read more
Source§

fn cleanup_authentications<'life0, 'async_trait>( &'life0 mut self, since: Option<Ulid>, until: Ulid, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<Ulid>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup old email authentications Read more
Source§

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

Source§

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>

Source§

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: String, 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§

fn cleanup<'life0, 'async_trait>( &'life0 mut self, since: Option<Ulid>, until: Ulid, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<Ulid>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup old recovery sessions Read more
Source§

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

Source§

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<UserRegistration>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup a [UserRegistration] 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, username: String, ip_address: Option<IpAddr>, user_agent: Option<String>, post_auth_action: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<UserRegistration, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Create a new [UserRegistration] session Read more
Source§

fn set_display_name<'life0, 'async_trait>( &'life0 mut self, user_registration: UserRegistration, display_name: String, ) -> Pin<Box<dyn Future<Output = Result<UserRegistration, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the display name of a [UserRegistration] Read more
Source§

fn set_terms_url<'life0, 'async_trait>( &'life0 mut self, user_registration: UserRegistration, terms_url: Url, ) -> Pin<Box<dyn Future<Output = Result<UserRegistration, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the terms URL of a [UserRegistration] Read more
Source§

fn set_email_authentication<'life0, 'life1, 'async_trait>( &'life0 mut self, user_registration: UserRegistration, email_authentication: &'life1 UserEmailAuthentication, ) -> Pin<Box<dyn Future<Output = Result<UserRegistration, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Set the email authentication code of a [UserRegistration] Read more
Source§

fn set_password<'life0, 'async_trait>( &'life0 mut self, user_registration: UserRegistration, hashed_password: String, version: u16, ) -> Pin<Box<dyn Future<Output = Result<UserRegistration, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the password of a [UserRegistration] Read more
Source§

fn set_registration_token<'life0, 'life1, 'async_trait>( &'life0 mut self, user_registration: UserRegistration, user_registration_token: &'life1 UserRegistrationToken, ) -> Pin<Box<dyn Future<Output = Result<UserRegistration, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Set the registration token of a [UserRegistration] Read more
Source§

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

Set an [UpstreamOAuthAuthorizationSession] to associate with a [UserRegistration] Read more
Source§

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

Complete a [UserRegistration] Read more
Source§

fn cleanup<'life0, 'async_trait>( &'life0 mut self, since: Option<Ulid>, until: Ulid, limit: usize, ) -> Pin<Box<dyn Future<Output = Result<(usize, Option<Ulid>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Cleanup [UserRegistration]s between the given IDs. Read more
Source§

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

Source§

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<UserRegistrationToken>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Lookup a [UserRegistrationToken] by its ID Read more
Source§

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

Lookup a [UserRegistrationToken] by its token string Read more
Source§

fn add<'life0, 'life1, 'life2, 'async_trait>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, token: String, usage_limit: Option<u32>, expires_at: Option<DateTime<Utc>>, ) -> Pin<Box<dyn Future<Output = Result<UserRegistrationToken, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Create a new [UserRegistrationToken] Read more
Source§

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

Increment the usage count of a [UserRegistrationToken] Read more
Source§

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

Revoke a [UserRegistrationToken] Read more
Source§

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

Unrevoke a previously revoked [UserRegistrationToken] Read more
Source§

fn set_expiry<'life0, 'async_trait>( &'life0 mut self, token: UserRegistrationToken, expires_at: Option<DateTime<Utc>>, ) -> Pin<Box<dyn Future<Output = Result<UserRegistrationToken, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the expiration time of a [UserRegistrationToken] Read more
Source§

fn set_usage_limit<'life0, 'async_trait>( &'life0 mut self, token: UserRegistrationToken, usage_limit: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<UserRegistrationToken, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Set the usage limit of a [UserRegistrationToken] Read more
Source§

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

List [UserRegistrationToken]s based on the provided filter Read more
Source§

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

Count [UserRegistrationToken]s based on the provided filter Read more
Source§

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

Source§

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, in a case-insensitive manner 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 deactivate<'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,

Deactivate a [User] Read more
Source§

fn reactivate<'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,

Reactivate a [User] Read more
Source§

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

Delete all the unsupported third-party IDs of 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>

Source§

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> UnsafeUnpin for MapErr<R, F>
where R: UnsafeUnpin, F: UnsafeUnpin,

§

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

Source§

fn len(&self) -> usize

The number of items that this chain link consists of.
Source§

fn append_to(self, v: &mut Vec<T>)

Append the elements in this link to the chain.
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> Paint for T
where T: ?Sized,

Source§

fn fg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the foreground set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like red() and green(), which have the same functionality but are pithier.

§Example

Set foreground color to white using fg():

use yansi::{Paint, Color};

painted.fg(Color::White);

Set foreground color to white using white().

use yansi::Paint;

painted.white();
Source§

fn primary(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Primary].

§Example
println!("{}", value.primary());
Source§

fn fixed(&self, color: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Fixed].

§Example
println!("{}", value.fixed(color));
Source§

fn rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the fg() set to [Color :: Rgb].

§Example
println!("{}", value.rgb(r, g, b));
Source§

fn black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Black].

§Example
println!("{}", value.black());
Source§

fn red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Red].

§Example
println!("{}", value.red());
Source§

fn green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Green].

§Example
println!("{}", value.green());
Source§

fn yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Yellow].

§Example
println!("{}", value.yellow());
Source§

fn blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Blue].

§Example
println!("{}", value.blue());
Source§

fn magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Magenta].

§Example
println!("{}", value.magenta());
Source§

fn cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: Cyan].

§Example
println!("{}", value.cyan());
Source§

fn white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: White].

§Example
println!("{}", value.white());
Source§

fn bright_black(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlack].

§Example
println!("{}", value.bright_black());
Source§

fn bright_red(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightRed].

§Example
println!("{}", value.bright_red());
Source§

fn bright_green(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightGreen].

§Example
println!("{}", value.bright_green());
Source§

fn bright_yellow(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightYellow].

§Example
println!("{}", value.bright_yellow());
Source§

fn bright_blue(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightBlue].

§Example
println!("{}", value.bright_blue());
Source§

fn bright_magenta(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.bright_magenta());
Source§

fn bright_cyan(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightCyan].

§Example
println!("{}", value.bright_cyan());
Source§

fn bright_white(&self) -> Painted<&T>

Returns self with the fg() set to [Color :: BrightWhite].

§Example
println!("{}", value.bright_white());
Source§

fn bg(&self, value: Color) -> Painted<&T>

Returns a styled value derived from self with the background set to value.

This method should be used rarely. Instead, prefer to use color-specific builder methods like on_red() and on_green(), which have the same functionality but are pithier.

§Example

Set background color to red using fg():

use yansi::{Paint, Color};

painted.bg(Color::Red);

Set background color to red using on_red().

use yansi::Paint;

painted.on_red();
Source§

fn on_primary(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Primary].

§Example
println!("{}", value.on_primary());
Source§

fn on_fixed(&self, color: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Fixed].

§Example
println!("{}", value.on_fixed(color));
Source§

fn on_rgb(&self, r: u8, g: u8, b: u8) -> Painted<&T>

Returns self with the bg() set to [Color :: Rgb].

§Example
println!("{}", value.on_rgb(r, g, b));
Source§

fn on_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Black].

§Example
println!("{}", value.on_black());
Source§

fn on_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Red].

§Example
println!("{}", value.on_red());
Source§

fn on_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Green].

§Example
println!("{}", value.on_green());
Source§

fn on_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Yellow].

§Example
println!("{}", value.on_yellow());
Source§

fn on_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Blue].

§Example
println!("{}", value.on_blue());
Source§

fn on_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Magenta].

§Example
println!("{}", value.on_magenta());
Source§

fn on_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: Cyan].

§Example
println!("{}", value.on_cyan());
Source§

fn on_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: White].

§Example
println!("{}", value.on_white());
Source§

fn on_bright_black(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlack].

§Example
println!("{}", value.on_bright_black());
Source§

fn on_bright_red(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightRed].

§Example
println!("{}", value.on_bright_red());
Source§

fn on_bright_green(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightGreen].

§Example
println!("{}", value.on_bright_green());
Source§

fn on_bright_yellow(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightYellow].

§Example
println!("{}", value.on_bright_yellow());
Source§

fn on_bright_blue(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightBlue].

§Example
println!("{}", value.on_bright_blue());
Source§

fn on_bright_magenta(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightMagenta].

§Example
println!("{}", value.on_bright_magenta());
Source§

fn on_bright_cyan(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightCyan].

§Example
println!("{}", value.on_bright_cyan());
Source§

fn on_bright_white(&self) -> Painted<&T>

Returns self with the bg() set to [Color :: BrightWhite].

§Example
println!("{}", value.on_bright_white());
Source§

fn attr(&self, value: Attribute) -> Painted<&T>

Enables the styling Attribute value.

This method should be used rarely. Instead, prefer to use attribute-specific builder methods like bold() and underline(), which have the same functionality but are pithier.

§Example

Make text bold using attr():

use yansi::{Paint, Attribute};

painted.attr(Attribute::Bold);

Make text bold using using bold().

use yansi::Paint;

painted.bold();
Source§

fn bold(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Bold].

§Example
println!("{}", value.bold());
Source§

fn dim(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Dim].

§Example
println!("{}", value.dim());
Source§

fn italic(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Italic].

§Example
println!("{}", value.italic());
Source§

fn underline(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Underline].

§Example
println!("{}", value.underline());

Returns self with the attr() set to [Attribute :: Blink].

§Example
println!("{}", value.blink());

Returns self with the attr() set to [Attribute :: RapidBlink].

§Example
println!("{}", value.rapid_blink());
Source§

fn invert(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Invert].

§Example
println!("{}", value.invert());
Source§

fn conceal(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Conceal].

§Example
println!("{}", value.conceal());
Source§

fn strike(&self) -> Painted<&T>

Returns self with the attr() set to [Attribute :: Strike].

§Example
println!("{}", value.strike());
Source§

fn quirk(&self, value: Quirk) -> Painted<&T>

Enables the yansi Quirk value.

This method should be used rarely. Instead, prefer to use quirk-specific builder methods like mask() and wrap(), which have the same functionality but are pithier.

§Example

Enable wrapping using .quirk():

use yansi::{Paint, Quirk};

painted.quirk(Quirk::Wrap);

Enable wrapping using wrap().

use yansi::Paint;

painted.wrap();
Source§

fn mask(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Mask].

§Example
println!("{}", value.mask());
Source§

fn wrap(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Wrap].

§Example
println!("{}", value.wrap());
Source§

fn linger(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Linger].

§Example
println!("{}", value.linger());
Source§

fn clear(&self) -> Painted<&T>

👎Deprecated since 1.0.1: renamed to resetting() due to conflicts with Vec::clear(). The clear() method will be removed in a future release.

Returns self with the quirk() set to [Quirk :: Clear].

§Example
println!("{}", value.clear());
Source§

fn resetting(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Resetting].

§Example
println!("{}", value.resetting());
Source§

fn bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: Bright].

§Example
println!("{}", value.bright());
Source§

fn on_bright(&self) -> Painted<&T>

Returns self with the quirk() set to [Quirk :: OnBright].

§Example
println!("{}", value.on_bright());
Source§

fn whenever(&self, value: Condition) -> Painted<&T>

Conditionally enable styling based on whether the Condition value applies. Replaces any previous condition.

See the crate level docs for more details.

§Example

Enable styling painted only when both stdout and stderr are TTYs:

use yansi::{Paint, Condition};

painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);
Source§

fn new(self) -> Painted<Self>
where Self: Sized,

Create a new Painted with a default Style. Read more
Source§

fn paint<S>(&self, style: S) -> Painted<&Self>
where S: Into<Style>,

Apply a style wholesale to self. Any previous style is replaced. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

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

Source§

fn schedule_job<'life0, 'life1, 'life2, 'async_trait, J>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, job: J, ) -> Pin<Box<dyn Future<Output = Result<(), <T as QueueJobRepository>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, J: 'async_trait + InsertableJob, T: 'async_trait,

Schedule a job to be executed as soon as possible by a worker. Read more
Source§

fn schedule_job_later<'life0, 'life1, 'life2, 'async_trait, J>( &'life0 mut self, rng: &'life1 mut (dyn RngCore + Send), clock: &'life2 dyn Clock, job: J, scheduled_at: DateTime<Utc>, ) -> Pin<Box<dyn Future<Output = Result<(), <T as QueueJobRepository>::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, J: 'async_trait + InsertableJob, T: 'async_trait,

Schedule a job to be executed at a later date by a worker. 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> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T
where T: Send + Sync,