pub struct LibsqlWal<FS: Io> { /* private fields */ }
Trait Implementations§
Source§impl<FS: Io> Wal for LibsqlWal<FS>
impl<FS: Io> Wal for LibsqlWal<FS>
Source§fn begin_read_txn(&mut self) -> Result<bool>
fn begin_read_txn(&mut self) -> Result<bool>
start a read transaction. Returns whether the in-memory page cache should be invalidated.
fn end_read_txn(&mut self)
Source§fn find_frame(&mut self, page_no: NonZeroU32) -> Result<Option<NonZeroU32>>
fn find_frame(&mut self, page_no: NonZeroU32) -> Result<Option<NonZeroU32>>
locate the frame containing page
page_no
Source§fn read_frame(&mut self, page_no: NonZeroU32, buffer: &mut [u8]) -> Result<()>
fn read_frame(&mut self, page_no: NonZeroU32, buffer: &mut [u8]) -> Result<()>
reads frame
frame_no
into buffer.fn db_size(&self) -> u32
fn begin_write_txn(&mut self) -> Result<()>
fn end_write_txn(&mut self) -> Result<()>
fn undo<U: UndoHandler>(&mut self, handler: Option<&mut U>) -> Result<()>
fn savepoint(&mut self, rollback_data: &mut [u32])
fn savepoint_undo(&mut self, rollback_data: &mut [u32]) -> Result<()>
Source§fn insert_frames(
&mut self,
page_size: c_int,
page_headers: &mut PageHeaders,
size_after: u32,
_is_commit: bool,
_sync_flags: c_int,
) -> Result<usize>
fn insert_frames( &mut self, page_size: c_int, page_headers: &mut PageHeaders, size_after: u32, _is_commit: bool, _sync_flags: c_int, ) -> Result<usize>
Insert frames in the wal. On commit, returns the number of inserted frames for that
transaction, or 0 for non-commit calls.
Source§fn checkpoint(
&mut self,
_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 checkpoint( &mut self, _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<()>
Returns the number of frames in the log and the number of checkpointed frames in the WAL.
fn exclusive_mode(&mut self, op: c_int) -> Result<()>
fn uses_heap_memory(&self) -> bool
fn set_db(&mut self, _db: &mut Sqlite3Db)
Source§fn callback(&self) -> i32
fn callback(&self) -> i32
Return the value to pass to a sqlite3_wal_hook callback, the
number of frames in the WAL at the point of the last commit since
sqlite3WalCallback() was called. If no commits have occurred since
the last call, then return 0.
fn frames_in_wal(&self) -> u32
Auto Trait Implementations§
impl<FS> !Freeze for LibsqlWal<FS>
impl<FS> !RefUnwindSafe for LibsqlWal<FS>
impl<FS> Send for LibsqlWal<FS>
impl<FS> Sync for LibsqlWal<FS>
impl<FS> Unpin for LibsqlWal<FS>
impl<FS> !UnwindSafe for LibsqlWal<FS>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.