pub trait Model: Send + Sync {
// Required methods
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn user(&self) -> &dyn UserModel;
fn client(&self) -> &dyn ClientModel;
fn login_session(&self) -> &dyn LoginSessionModel;
fn authorization_code(&self) -> &dyn AuthorizationCodeModel;
fn access_token(&self) -> &dyn AccessTokenModel;
fn refresh_token(&self) -> &dyn RefreshTokenModel;
}
Expand description
The top level trait to get all models (tables/collections).
Required Methods§
Sourcefn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn close<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Close database connection.
Sourcefn client(&self) -> &dyn ClientModel
fn client(&self) -> &dyn ClientModel
To get the client model.
Sourcefn login_session(&self) -> &dyn LoginSessionModel
fn login_session(&self) -> &dyn LoginSessionModel
To get the login session model.
To get the authorization code model.
Sourcefn access_token(&self) -> &dyn AccessTokenModel
fn access_token(&self) -> &dyn AccessTokenModel
To get the access token model.
Sourcefn refresh_token(&self) -> &dyn RefreshTokenModel
fn refresh_token(&self) -> &dyn RefreshTokenModel
To get the refresh token model.