pub trait WalManager {
    type Wal: Wal;

    // Required methods
    fn use_shared_memory(&self) -> bool;
    fn open(
        &self,
        vfs: &mut Vfs,
        file: &mut Sqlite3File,
        no_shm_mode: c_int,
        max_log_size: i64,
        db_path: &CStr
    ) -> Result<Self::Wal>;
    fn close(
        &self,
        wal: &mut Self::Wal,
        db: &mut Sqlite3Db,
        sync_flags: c_int,
        scratch: Option<&mut [u8]>
    ) -> Result<()>;
    fn destroy_log(&self, vfs: &mut Vfs, db_path: &CStr) -> Result<()>;
    fn log_exists(&self, vfs: &mut Vfs, db_path: &CStr) -> Result<bool>;
    fn destroy(self)
       where Self: Sized;

    // Provided method
    fn wrap<U>(self, wrapper: U) -> WalWrapper<U, Self>
       where U: WrapWal<Self::Wal> + Clone,
             Self: Sized { ... }
}

Required Associated Types§

Required Methods§

source

fn use_shared_memory(&self) -> bool

source

fn open( &self, vfs: &mut Vfs, file: &mut Sqlite3File, no_shm_mode: c_int, max_log_size: i64, db_path: &CStr ) -> Result<Self::Wal>

source

fn close( &self, wal: &mut Self::Wal, db: &mut Sqlite3Db, sync_flags: c_int, scratch: Option<&mut [u8]> ) -> Result<()>

source

fn destroy_log(&self, vfs: &mut Vfs, db_path: &CStr) -> Result<()>

source

fn log_exists(&self, vfs: &mut Vfs, db_path: &CStr) -> Result<bool>

source

fn destroy(self)
where Self: Sized,

Provided Methods§

source

fn wrap<U>(self, wrapper: U) -> WalWrapper<U, Self>
where U: WrapWal<Self::Wal> + Clone, Self: Sized,

Implementors§

source§

impl WalManager for Sqlite3WalManager

source§

impl<L, R> WalManager for Either<L, R>
where L: WalManager, R: WalManager,

§

type Wal = Either<<L as WalManager>::Wal, <R as WalManager>::Wal>

source§

impl<T, U> WalManager for WalWrapper<T, U>
where T: WrapWal<U::Wal> + Clone, U: WalManager,

§

type Wal = WrappedWal<T, <U as WalManager>::Wal>