pub trait AbstractServerBans: Sync + Send {
// Required methods
fn insert_ban<'life0, 'life1, 'async_trait>(
&'life0 self,
ban: &'life1 ServerBan,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fetch_ban<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ServerBan>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn fetch_bans<'life0, 'life1, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServerBan>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn delete_ban<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MemberCompositeKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}
Required Methods§
Sourcefn insert_ban<'life0, 'life1, 'async_trait>(
&'life0 self,
ban: &'life1 ServerBan,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_ban<'life0, 'life1, 'async_trait>(
&'life0 self,
ban: &'life1 ServerBan,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Insert new ban into database
Sourcefn fetch_ban<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ServerBan>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn fetch_ban<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
user_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<ServerBan>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Fetch a server ban by server and user id
Sourcefn fetch_bans<'life0, 'life1, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServerBan>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_bans<'life0, 'life1, 'async_trait>(
&'life0 self,
server_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServerBan>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Fetch all bans in a server
Sourcefn delete_ban<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MemberCompositeKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_ban<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 MemberCompositeKey,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete a ban from the database