Trait Operation

Source
pub trait Operation<'a> {
    // Required methods
    fn new<'life0, 'async_trait>(
        uri: &'life0 str,
        database: &'a str,
        collection: &'a str,
    ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait;
    fn change_collection<'life0, 'async_trait>(
        &'life0 mut self,
        collection: &'a str,
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
       where Self: 'async_trait,
             'a: 'async_trait,
             'life0: 'async_trait;
    fn create_index<'life0, 'async_trait>(
        &'life0 self,
        index: Document,
    ) -> Pin<Box<dyn Future<Output = Option<CreateIndexResult>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_data<'life0, 'async_trait>(
        &'life0 self,
        last_id: Option<ObjectId>,
        limit: Option<i64>,
    ) -> Pin<Box<dyn Future<Output = Option<Cursor<Document>>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_last_id<'life0, 'async_trait>(
        &'life0 self,
    ) -> Pin<Box<dyn Future<Output = Option<ObjectId>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn insert_many<'life0, 'async_trait>(
        &'life0 self,
        document: Vec<Document>,
    ) -> Pin<Box<dyn Future<Output = InsertManyResult> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_last_id<'life0, 'life1, 'async_trait>(
        &'life0 self,
        last_id: &'life1 Option<ObjectId>,
    ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
}

Required Methods§

Source

fn new<'life0, 'async_trait>( uri: &'life0 str, database: &'a str, collection: &'a str, ) -> Pin<Box<dyn Future<Output = Self> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Source

fn change_collection<'life0, 'async_trait>( &'life0 mut self, collection: &'a str, ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait, 'a: 'async_trait, 'life0: 'async_trait,

Source

fn create_index<'life0, 'async_trait>( &'life0 self, index: Document, ) -> Pin<Box<dyn Future<Output = Option<CreateIndexResult>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_data<'life0, 'async_trait>( &'life0 self, last_id: Option<ObjectId>, limit: Option<i64>, ) -> Pin<Box<dyn Future<Output = Option<Cursor<Document>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn get_last_id<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Option<ObjectId>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn insert_many<'life0, 'async_trait>( &'life0 self, document: Vec<Document>, ) -> Pin<Box<dyn Future<Output = InsertManyResult> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn update_last_id<'life0, 'life1, 'async_trait>( &'life0 self, last_id: &'life1 Option<ObjectId>, ) -> Pin<Box<dyn Future<Output = String> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§