pub trait AnyRoleMethod:
AnyExt
+ DatabaseConsumer
+ Serialize
+ Deserialize {
// Required methods
fn get<'life0, 'async_trait>(
&'life0 self,
db_conns: DbConns,
user_id: UserId,
) -> Pin<Box<dyn Future<Output = Result<Option<CompactString>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn set<'life0, 'async_trait>(
&'life0 self,
db_conns: DbConns,
user_id: UserId,
role: CompactString,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn remove<'life0, 'async_trait>(
&'life0 self,
db_conns: DbConns,
user_id: UserId,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait implemented for every role’s storage backend.
Required Methods§
Sourcefn get<'life0, 'async_trait>(
&'life0 self,
db_conns: DbConns,
user_id: UserId,
) -> Pin<Box<dyn Future<Output = Result<Option<CompactString>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get<'life0, 'async_trait>(
&'life0 self,
db_conns: DbConns,
user_id: UserId,
) -> Pin<Box<dyn Future<Output = Result<Option<CompactString>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the role of the given user.
Trait Implementations§
Source§impl<'typetag> Serialize for dyn AnyRoleMethod + 'typetag
impl<'typetag> Serialize for dyn AnyRoleMethod + 'typetag
Source§impl<'typetag> Serialize for dyn AnyRoleMethod + Send + 'typetag
impl<'typetag> Serialize for dyn AnyRoleMethod + Send + 'typetag
Source§impl<'typetag> Serialize for dyn AnyRoleMethod + Sync + 'typetag
impl<'typetag> Serialize for dyn AnyRoleMethod + Sync + 'typetag
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".