pub struct Wal<S: Source> { /* private fields */ }Expand description
A -wal file, read up to its last commit.
Implementations§
Source§impl<S: Source> Wal<S>
impl<S: Source> Wal<S>
Sourcepub fn open(source: S) -> Result<Wal<S>>
pub fn open(source: S) -> Result<Wal<S>>
Read and validate a -wal file.
An empty file is not an error: sqlite leaves a zero length -wal
behind after a checkpoint, and so does a database that has been in
wal mode but never written to.
Sourcepub fn page_count(&self) -> u32
pub fn page_count(&self) -> u32
Database size in pages as of the last commit, zero for an empty log.
Sourcepub fn frame_counts(&self) -> (u32, u32)
pub fn frame_counts(&self) -> (u32, u32)
Frames the log holds, and how many of them survived validation and ended at a commit.
Auto Trait Implementations§
impl<S> Freeze for Wal<S>where
S: Freeze,
impl<S> RefUnwindSafe for Wal<S>where
S: RefUnwindSafe,
impl<S> Send for Wal<S>where
S: Send,
impl<S> Sync for Wal<S>where
S: Sync,
impl<S> Unpin for Wal<S>where
S: Unpin,
impl<S> UnsafeUnpin for Wal<S>where
S: UnsafeUnpin,
impl<S> UnwindSafe for Wal<S>where
S: UnwindSafe,
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