debot_db

Trait HelperCollection

Source
pub trait HelperCollection<T> {
    // Required methods
    fn update<'life0, 'async_trait>(
        &'life0 self,
        query: Document,
        update: Document,
        upsert: bool,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete<'life0, 'async_trait>(
        &'life0 self,
        query: Document,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_all<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn search<'life0, 'async_trait>(
        &'life0 self,
        query: Document,
        mode: SearchMode,
        limit: Option<u32>,
        id: Option<u32>,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Box<dyn Error>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn update<'life0, 'async_trait>( &'life0 self, query: Document, update: Document, upsert: bool, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn delete<'life0, 'async_trait>( &'life0 self, query: Document, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn delete_all<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn search<'life0, 'async_trait>( &'life0 self, query: Document, mode: SearchMode, limit: Option<u32>, id: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementations on Foreign Types§

Source§

impl<T> HelperCollection<T> for Collection<T>

Source§

fn update<'life0, 'async_trait>( &'life0 self, query: Document, update: Document, upsert: bool, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete<'life0, 'async_trait>( &'life0 self, query: Document, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn delete_all<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn search<'life0, 'async_trait>( &'life0 self, query: Document, mode: SearchMode, limit: Option<u32>, id: Option<u32>, ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, Box<dyn Error>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§