WrapWal

Trait WrapWal 

Source
pub trait WrapWal<W: Wal> {
Show 23 methods // Provided methods fn limit(&mut self, wrapped: &mut W, size: i64) { ... } fn begin_read_txn(&mut self, wrapped: &mut W) -> Result<bool> { ... } fn end_read_txn(&mut self, wrapped: &mut W) { ... } fn find_frame( &mut self, wrapped: &mut W, page_no: NonZeroU32, ) -> Result<Option<NonZeroU32>> { ... } fn read_frame( &mut self, wrapped: &mut W, frame_no: NonZeroU32, buffer: &mut [u8], ) -> Result<()> { ... } fn read_frame_raw( &mut self, wrapped: &mut W, frame_no: NonZeroU32, buffer: &mut [u8], ) -> Result<()> { ... } fn db_size(&self, wrapped: &W) -> u32 { ... } fn begin_write_txn(&mut self, wrapped: &mut W) -> Result<()> { ... } fn end_write_txn(&mut self, wrapped: &mut W) -> Result<()> { ... } fn undo<U: UndoHandler>( &mut self, wrapped: &mut W, handler: Option<&mut U>, ) -> Result<()> { ... } fn savepoint(&mut self, wrapped: &mut W, rollback_data: &mut [u32]) { ... } fn savepoint_undo( &mut self, wrapped: &mut W, rollback_data: &mut [u32], ) -> Result<()> { ... } fn frame_count(&self, wrapped: &W, locked: i32) -> Result<u32> { ... } fn insert_frames( &mut self, wrapped: &mut W, page_size: c_int, page_headers: &mut PageHeaders, size_after: u32, is_commit: bool, sync_flags: c_int, ) -> Result<usize> { ... } fn checkpoint( &mut self, wrapped: &mut W, db: &mut Sqlite3Db, mode: CheckpointMode, busy_handler: Option<&mut dyn BusyHandler>, sync_flags: u32, buf: &mut [u8], checkpoint_cb: Option<&mut dyn CheckpointCallback>, in_wal: Option<&mut i32>, backfilled: Option<&mut i32>, ) -> Result<()> { ... } fn exclusive_mode(&mut self, wrapped: &mut W, op: c_int) -> Result<()> { ... } fn uses_heap_memory(&self, wrapped: &W) -> bool { ... } fn set_db(&mut self, wrapped: &mut W, db: &mut Sqlite3Db) { ... } fn callback(&self, wrapped: &W) -> i32 { ... } fn frames_in_wal(&self, wrapped: &W) -> u32 { ... } fn open<M: WalManager<Wal = W>>( &self, manager: &M, vfs: &mut Vfs, file: &mut Sqlite3File, no_shm_mode: c_int, max_log_size: i64, db_path: &CStr, ) -> Result<W> { ... } fn close<M: WalManager<Wal = W>>( &mut self, manager: &M, wrapped: &mut W, db: &mut Sqlite3Db, sync_flags: c_int, scratch: Option<&mut [u8]>, ) -> Result<()> { ... } fn then<T>(self, other: T) -> Then<Self, T, W> where Self: Sized { ... }
}
Expand description

Trait implemented by implementor that only need to wrap around another Wal implementation. By default, all methods delegate to the wrapped wal.

Provided Methods§

Source

fn limit(&mut self, wrapped: &mut W, size: i64)

Source

fn begin_read_txn(&mut self, wrapped: &mut W) -> Result<bool>

Source

fn end_read_txn(&mut self, wrapped: &mut W)

Source

fn find_frame( &mut self, wrapped: &mut W, page_no: NonZeroU32, ) -> Result<Option<NonZeroU32>>

Source

fn read_frame( &mut self, wrapped: &mut W, frame_no: NonZeroU32, buffer: &mut [u8], ) -> Result<()>

Source

fn read_frame_raw( &mut self, wrapped: &mut W, frame_no: NonZeroU32, buffer: &mut [u8], ) -> Result<()>

Source

fn db_size(&self, wrapped: &W) -> u32

Source

fn begin_write_txn(&mut self, wrapped: &mut W) -> Result<()>

Source

fn end_write_txn(&mut self, wrapped: &mut W) -> Result<()>

Source

fn undo<U: UndoHandler>( &mut self, wrapped: &mut W, handler: Option<&mut U>, ) -> Result<()>

Source

fn savepoint(&mut self, wrapped: &mut W, rollback_data: &mut [u32])

Source

fn savepoint_undo( &mut self, wrapped: &mut W, rollback_data: &mut [u32], ) -> Result<()>

Source

fn frame_count(&self, wrapped: &W, locked: i32) -> Result<u32>

Source

fn insert_frames( &mut self, wrapped: &mut W, page_size: c_int, page_headers: &mut PageHeaders, size_after: u32, is_commit: bool, sync_flags: c_int, ) -> Result<usize>

Source

fn checkpoint( &mut self, wrapped: &mut W, db: &mut Sqlite3Db, mode: CheckpointMode, busy_handler: Option<&mut dyn BusyHandler>, sync_flags: u32, buf: &mut [u8], checkpoint_cb: Option<&mut dyn CheckpointCallback>, in_wal: Option<&mut i32>, backfilled: Option<&mut i32>, ) -> Result<()>

Source

fn exclusive_mode(&mut self, wrapped: &mut W, op: c_int) -> Result<()>

Source

fn uses_heap_memory(&self, wrapped: &W) -> bool

Source

fn set_db(&mut self, wrapped: &mut W, db: &mut Sqlite3Db)

Source

fn callback(&self, wrapped: &W) -> i32

Source

fn frames_in_wal(&self, wrapped: &W) -> u32

Source

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

Source

fn close<M: WalManager<Wal = W>>( &mut self, manager: &M, wrapped: &mut W, db: &mut Sqlite3Db, sync_flags: c_int, scratch: Option<&mut [u8]>, ) -> Result<()>

Source

fn then<T>(self, other: T) -> Then<Self, T, W>
where Self: Sized,

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.

Implementations on Foreign Types§

Source§

impl<T: WrapWal<W>, W: Wal> WrapWal<W> for Option<T>

Source§

fn limit(&mut self, wrapped: &mut W, size: i64)

Source§

fn begin_read_txn(&mut self, wrapped: &mut W) -> Result<bool>

Source§

fn end_read_txn(&mut self, wrapped: &mut W)

Source§

fn find_frame( &mut self, wrapped: &mut W, page_no: NonZeroU32, ) -> Result<Option<NonZeroU32>>

Source§

fn read_frame( &mut self, wrapped: &mut W, frame_no: NonZeroU32, buffer: &mut [u8], ) -> Result<()>

Source§

fn read_frame_raw( &mut self, wrapped: &mut W, frame_no: NonZeroU32, buffer: &mut [u8], ) -> Result<()>

Source§

fn db_size(&self, wrapped: &W) -> u32

Source§

fn begin_write_txn(&mut self, wrapped: &mut W) -> Result<()>

Source§

fn end_write_txn(&mut self, wrapped: &mut W) -> Result<()>

Source§

fn undo<U: UndoHandler>( &mut self, wrapped: &mut W, handler: Option<&mut U>, ) -> Result<()>

Source§

fn savepoint(&mut self, wrapped: &mut W, rollback_data: &mut [u32])

Source§

fn savepoint_undo( &mut self, wrapped: &mut W, rollback_data: &mut [u32], ) -> Result<()>

Source§

fn insert_frames( &mut self, wrapped: &mut W, page_size: c_int, page_headers: &mut PageHeaders, size_after: u32, is_commit: bool, sync_flags: c_int, ) -> Result<usize>

Source§

fn checkpoint( &mut self, wrapped: &mut W, db: &mut Sqlite3Db, mode: CheckpointMode, busy_handler: Option<&mut dyn BusyHandler>, sync_flags: u32, buf: &mut [u8], checkpoint_cb: Option<&mut dyn CheckpointCallback>, in_wal: Option<&mut i32>, backfilled: Option<&mut i32>, ) -> Result<()>

Source§

fn exclusive_mode(&mut self, wrapped: &mut W, op: c_int) -> Result<()>

Source§

fn uses_heap_memory(&self, wrapped: &W) -> bool

Source§

fn set_db(&mut self, wrapped: &mut W, db: &mut Sqlite3Db)

Source§

fn callback(&self, wrapped: &W) -> i32

Source§

fn frames_in_wal(&self, wrapped: &W) -> u32

Source§

fn close<M: WalManager<Wal = W>>( &mut self, manager: &M, wrapped: &mut W, db: &mut Sqlite3Db, sync_flags: c_int, scratch: Option<&mut [u8]>, ) -> Result<()>

Implementors§

Source§

impl<A, B, W> WrapWal<W> for Then<A, B, W>
where A: WrapWal<WalRef<B, W>>, B: WrapWal<W>, W: Wal,

Source§

impl<W: Wal> WrapWal<W> for PassthroughWalWrapper