Struct sqlite_rs::header::FileChangeCounter
source · pub struct FileChangeCounter(/* private fields */);Expand description
File change counter (4 Bytes)
The file change counter is a 4-byte big-endian integer at offset 24 that is incremented whenever the database file is unlocked after having been modified. When two or more processes are reading the same database file, each process can detect database changes from other processes by monitoring the change counter. A process will normally want to flush its database page cache when another process modified the database, since the cache has become stale. The file change counter facilitates this.
In WAL mode, changes to the database are detected using the wal-index and so the change counter is not needed. Hence, the change counter might not be incremented on each transaction in WAL mode.
Methods from Deref<Target = u32>§
pub const MIN: u32 = 0u32
pub const MAX: u32 = 4_294_967_295u32
pub const BITS: u32 = 32u32
Trait Implementations§
source§impl Debug for FileChangeCounter
impl Debug for FileChangeCounter
source§impl Deref for FileChangeCounter
impl Deref for FileChangeCounter
Auto Trait Implementations§
impl RefUnwindSafe for FileChangeCounter
impl Send for FileChangeCounter
impl Sync for FileChangeCounter
impl Unpin for FileChangeCounter
impl UnwindSafe for FileChangeCounter
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