pub trait AuthorizationCodeModel: Sync {
// Required methods
fn init<'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 get<'life0, 'life1, 'async_trait>(
&'life0 self,
authorization_code: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthorizationCode>, Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn add<'life0, 'life1, 'async_trait>(
&'life0 self,
code: &'life1 AuthorizationCode,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn del<'life0, 'life1, 'async_trait>(
&'life0 self,
cond: &'life1 QueryCond<'_>,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Expand description
Model operations.
Required Methods§
Sourcefn init<'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 init<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
To create and initialize the table/collection.
Sourcefn get<'life0, 'life1, 'async_trait>(
&'life0 self,
authorization_code: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthorizationCode>, Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
authorization_code: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Option<AuthorizationCode>, Box<dyn StdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
To get an item.