Struct revolt_database::ReferenceDb
source · pub struct ReferenceDb {
pub bots: Arc<Mutex<HashMap<String, Bot>>>,
}Expand description
Reference implementation
Fields§
§bots: Arc<Mutex<HashMap<String, Bot>>>Trait Implementations§
source§impl AbstractBots for ReferenceDb
impl AbstractBots for ReferenceDb
source§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<'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
source§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 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
source§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 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
source§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 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
source§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 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
source§impl AbstractMigrations for ReferenceDb
impl AbstractMigrations for ReferenceDb
source§impl Clone for ReferenceDb
impl Clone for ReferenceDb
source§fn clone(&self) -> ReferenceDb
fn clone(&self) -> ReferenceDb
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Default for ReferenceDb
impl Default for ReferenceDb
source§fn default() -> ReferenceDb
fn default() -> ReferenceDb
Returns the “default value” for a type. Read more
impl AbstractDatabase for ReferenceDb
Auto Trait Implementations§
impl !RefUnwindSafe for ReferenceDb
impl Send for ReferenceDb
impl Sync for ReferenceDb
impl Unpin for ReferenceDb
impl !UnwindSafe for ReferenceDb
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more