Trait deno_kv::Database

source ·
pub trait Database {
    type QMH: QueueMessageHandle + 'static;

    // Required methods
    fn snapshot_read<'life0, 'async_trait>(
        &'life0 self,
        state: Rc<RefCell<OpState>>,
        requests: Vec<ReadRange>,
        options: SnapshotReadOptions
    ) -> Pin<Box<dyn Future<Output = Result<Vec<ReadRangeOutput>, AnyError>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn atomic_write<'life0, 'async_trait>(
        &'life0 self,
        state: Rc<RefCell<OpState>>,
        write: AtomicWrite
    ) -> Pin<Box<dyn Future<Output = Result<Option<CommitResult>, AnyError>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn dequeue_next_message<'life0, 'async_trait>(
        &'life0 self,
        state: Rc<RefCell<OpState>>
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::QMH>, AnyError>> + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn close(&self);
}

Required Associated Types§

Required Methods§

source

fn snapshot_read<'life0, 'async_trait>( &'life0 self, state: Rc<RefCell<OpState>>, requests: Vec<ReadRange>, options: SnapshotReadOptions ) -> Pin<Box<dyn Future<Output = Result<Vec<ReadRangeOutput>, AnyError>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn atomic_write<'life0, 'async_trait>( &'life0 self, state: Rc<RefCell<OpState>>, write: AtomicWrite ) -> Pin<Box<dyn Future<Output = Result<Option<CommitResult>, AnyError>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn dequeue_next_message<'life0, 'async_trait>( &'life0 self, state: Rc<RefCell<OpState>> ) -> Pin<Box<dyn Future<Output = Result<Option<Self::QMH>, AnyError>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn close(&self)

Implementations on Foreign Types§

source§

impl Database for Box<dyn DynamicDb>

§

type QMH = Box<dyn QueueMessageHandle, Global>

source§

fn snapshot_read<'life0, 'async_trait>( &'life0 self, state: Rc<RefCell<OpState>>, requests: Vec<ReadRange>, options: SnapshotReadOptions ) -> Pin<Box<dyn Future<Output = Result<Vec<ReadRangeOutput>, AnyError>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn atomic_write<'life0, 'async_trait>( &'life0 self, state: Rc<RefCell<OpState>>, write: AtomicWrite ) -> Pin<Box<dyn Future<Output = Result<Option<CommitResult>, AnyError>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn dequeue_next_message<'life0, 'async_trait>( &'life0 self, state: Rc<RefCell<OpState>> ) -> Pin<Box<dyn Future<Output = Result<Option<Box<dyn QueueMessageHandle>>, AnyError>> + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source§

fn close(&self)

Implementors§