Trait SimpleTransaction

Source
pub trait SimpleTransaction {
    // Required methods
    fn closed(&self) -> bool;
    fn cancel<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn count<'life0, 'async_trait>(
        &'life0 mut self,
        tags: TagBucket,
    ) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn commit<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn exi<'life0, 'async_trait, K>(
        &'life0 self,
        key: K,
        tags: TagBucket,
    ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + 'async_trait>>
       where K: 'async_trait + Into<Key> + Send,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn get<'life0, 'async_trait, K>(
        &'life0 self,
        key: K,
        tags: TagBucket,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Val>, Error>> + 'async_trait>>
       where K: 'async_trait + Into<Key> + Send,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn set<'life0, 'async_trait, K, V>(
        &'life0 mut self,
        key: K,
        val: V,
        tags: TagBucket,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where K: 'async_trait + Into<Key> + Send,
             V: 'async_trait + Into<Key> + Send,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn put<'life0, 'async_trait, K, V>(
        &'life0 mut self,
        key: K,
        val: V,
        tags: TagBucket,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where K: 'async_trait + Into<Key> + Send,
             V: 'async_trait + Into<Key> + Send,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn del<'life0, 'async_trait, K>(
        &'life0 mut self,
        key: K,
        tags: TagBucket,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
       where K: 'async_trait + Into<Key> + Send,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn iterate<'life0, 'async_trait>(
        &'life0 self,
        tags: TagBucket,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<KeyValuePair, Error>>, Error>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn prefix_iterate<'life0, 'async_trait, P>(
        &'life0 self,
        prefix: P,
        tags: TagBucket,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<KeyValuePair, Error>>, Error>> + 'async_trait>>
       where P: 'async_trait + Into<Key> + Send,
             Self: 'async_trait,
             'life0: 'async_trait;
    fn suffix_iterate<'life0, 'async_trait, S>(
        &'life0 self,
        suffix: S,
        tags: TagBucket,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<KeyValuePair, Error>>, Error>> + 'async_trait>>
       where S: 'async_trait + Into<Key> + Send,
             Self: 'async_trait,
             'life0: 'async_trait;
}

Required Methods§

Source

fn closed(&self) -> bool

Source

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

Source

fn count<'life0, 'async_trait>( &'life0 mut self, tags: TagBucket, ) -> Pin<Box<dyn Future<Output = Result<usize, Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

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

Source

fn exi<'life0, 'async_trait, K>( &'life0 self, key: K, tags: TagBucket, ) -> Pin<Box<dyn Future<Output = Result<bool, Error>> + 'async_trait>>
where K: 'async_trait + Into<Key> + Send, Self: 'async_trait, 'life0: 'async_trait,

Source

fn get<'life0, 'async_trait, K>( &'life0 self, key: K, tags: TagBucket, ) -> Pin<Box<dyn Future<Output = Result<Option<Val>, Error>> + 'async_trait>>
where K: 'async_trait + Into<Key> + Send, Self: 'async_trait, 'life0: 'async_trait,

Fetch a key from the database

Source

fn set<'life0, 'async_trait, K, V>( &'life0 mut self, key: K, val: V, tags: TagBucket, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where K: 'async_trait + Into<Key> + Send, V: 'async_trait + Into<Key> + Send, Self: 'async_trait, 'life0: 'async_trait,

Insert or update a key in the database

Source

fn put<'life0, 'async_trait, K, V>( &'life0 mut self, key: K, val: V, tags: TagBucket, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where K: 'async_trait + Into<Key> + Send, V: 'async_trait + Into<Key> + Send, Self: 'async_trait, 'life0: 'async_trait,

Insert a key if it doesn’t exist in the database

Source

fn del<'life0, 'async_trait, K>( &'life0 mut self, key: K, tags: TagBucket, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + 'async_trait>>
where K: 'async_trait + Into<Key> + Send, Self: 'async_trait, 'life0: 'async_trait,

Delete a key

Source

fn iterate<'life0, 'async_trait>( &'life0 self, tags: TagBucket, ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<KeyValuePair, Error>>, Error>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn prefix_iterate<'life0, 'async_trait, P>( &'life0 self, prefix: P, tags: TagBucket, ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<KeyValuePair, Error>>, Error>> + 'async_trait>>
where P: 'async_trait + Into<Key> + Send, Self: 'async_trait, 'life0: 'async_trait,

Source

fn suffix_iterate<'life0, 'async_trait, S>( &'life0 self, suffix: S, tags: TagBucket, ) -> Pin<Box<dyn Future<Output = Result<Vec<Result<KeyValuePair, Error>>, Error>> + 'async_trait>>
where S: 'async_trait + Into<Key> + Send, Self: 'async_trait, 'life0: '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§