Trait revolt_database::AbstractBots
source · pub trait AbstractBots: Sync + Send {
// Required methods
fn fetch_bot<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Bot>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fetch_bot_by_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Bot>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn insert_bot<'life0, 'life1, 'async_trait>(
&'life0 self,
bot: &'life1 Bot
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn update_bot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
partial: &'life2 PartialBot,
remove: Vec<FieldsBot>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn delete_bot<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn fetch_bots_by_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Vec<Bot>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn get_number_of_bots_by_user<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<usize>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Required Methods§
sourcefn fetch_bot<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Bot>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_bot<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<Bot>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Fetch a bot by its id
sourcefn fetch_bot_by_token<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Bot>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn fetch_bot_by_token<'life0, 'life1, 'async_trait>( &'life0 self, token: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<Bot>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Fetch a bot by its token
sourcefn insert_bot<'life0, 'life1, 'async_trait>(
&'life0 self,
bot: &'life1 Bot
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn insert_bot<'life0, 'life1, 'async_trait>( &'life0 self, bot: &'life1 Bot ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Insert new bot into the database
sourcefn update_bot<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
id: &'life1 str,
partial: &'life2 PartialBot,
remove: Vec<FieldsBot>
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn update_bot<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, id: &'life1 str, partial: &'life2 PartialBot, remove: Vec<FieldsBot> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,
Update bot with new information
sourcefn delete_bot<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_bot<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
Delete a bot from the database