Skip to main content

WalDocumentOps

Trait WalDocumentOps 

Source
pub trait WalDocumentOps: Send + Sync {
    // Required methods
    fn get_document<'life0, 'life1, 'async_trait>(
        &'life0 self,
        id: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, WalError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             Self: 'async_trait;
    fn apply_operation<'life0, 'life1, 'life2, 'async_trait>(
        &'life0 self,
        entry_type: &'life1 EntryType,
        id: &'life2 str,
        data: Option<Value>,
    ) -> Pin<Box<dyn Future<Output = Result<(), WalError>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait,
             Self: 'async_trait;

    // Provided method
    fn set_recovery_mode(&self, mode: bool) { ... }
}
Expand description

Operations required for WAL recovery and verification

Required Methods§

Source

fn get_document<'life0, 'life1, 'async_trait>( &'life0 self, id: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Option<Value>, WalError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Get a document by ID

Source

fn apply_operation<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, entry_type: &'life1 EntryType, id: &'life2 str, data: Option<Value>, ) -> Pin<Box<dyn Future<Output = Result<(), WalError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Apply a WAL operation to a document

Provided Methods§

Source

fn set_recovery_mode(&self, mode: bool)

Set recovery mode (skip WAL logging during recovery)

Implementors§