Trait WalManager

Source
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<A, B> WalManager for Either<A, B>
where A: WalManager, B: WalManager,

Source§

type Wal = Either<<A as WalManager>::Wal, <B as WalManager>::Wal>

Source§

impl<A, B, C> WalManager for Either3<A, B, C>
where A: WalManager, B: WalManager, C: WalManager,

Source§

type Wal = Either3<<A as WalManager>::Wal, <B as WalManager>::Wal, <C as WalManager>::Wal>

Source§

impl<A, B, C, D> WalManager for Either4<A, B, C, D>

Source§

type Wal = Either4<<A as WalManager>::Wal, <B as WalManager>::Wal, <C as WalManager>::Wal, <D as WalManager>::Wal>

Source§

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