pub enum PagerBackend {
Memory(Arc<SimplePager<MemoryVfs>>),
IoUring(Arc<SimplePager<IoUringVfs>>),
Unix(Arc<SimplePager<UnixVfs>>),
}Expand description
Pager backend that dispatches across VFS implementations.
Wraps SimplePager for both in-memory (:memory:) and on-disk
connections without making Connection generic.
Variants§
Memory(Arc<SimplePager<MemoryVfs>>)
In-memory VFS backend (:memory: databases).
IoUring(Arc<SimplePager<IoUringVfs>>)
Linux io_uring VFS backend (file-backed databases on Linux).
Unix(Arc<SimplePager<UnixVfs>>)
Unix filesystem VFS backend (file-backed databases on all unix platforms).
Implementations§
Source§impl PagerBackend
impl PagerBackend
Sourcepub fn is_memory(&self) -> bool
pub fn is_memory(&self) -> bool
Returns true if this backend uses the in-memory VFS (:memory:).
Sourcepub fn is_file_backed(&self) -> bool
pub fn is_file_backed(&self) -> bool
Returns true if this backend uses a file-backed VFS.
Sourcepub async fn set_vfs_busy_timeout_ms(&self, cx: &Cx, ms: u64)
pub async fn set_vfs_busy_timeout_ms(&self, cx: &Cx, ms: u64)
Propagate busy-timeout to the VFS file for cross-process lock retry.
Sourcepub async fn wal_frame_count(&self, cx: &Cx) -> usize
pub async fn wal_frame_count(&self, cx: &Cx) -> usize
Number of frames currently in the WAL for this pager.
Sourcepub fn publication_write_count(&self) -> u64
pub fn publication_write_count(&self) -> u64
Number of published metadata writes applied to this pager.
Sourcepub fn published_snapshot(&self) -> PagerPublishedSnapshot
pub fn published_snapshot(&self) -> PagerPublishedSnapshot
Published pager metadata snapshot for lock-light visibility checks.
Sourcepub async fn refresh_published_snapshot(
&self,
cx: &Cx,
) -> Result<PagerPublishedSnapshot>
pub async fn refresh_published_snapshot( &self, cx: &Cx, ) -> Result<PagerPublishedSnapshot>
Refresh the pager publication plane from the latest committed state and return the resulting snapshot.
Sourcepub async fn refresh_published_snapshot_for_clean_wal_read(
&self,
cx: &Cx,
) -> Result<PagerPublishedSnapshot>
pub async fn refresh_published_snapshot_for_clean_wal_read( &self, cx: &Cx, ) -> Result<PagerPublishedSnapshot>
Refresh the pager publication plane for a clean WAL-mode read boundary.
Bind a same-path connection counter into the underlying pager.
Sourcepub fn published_read_retry_count(&self) -> u64
pub fn published_read_retry_count(&self) -> u64
Number of retries readers have taken while binding a stable published snapshot.
Sourcepub fn kind_str(&self) -> &'static str
pub fn kind_str(&self) -> &'static str
Returns a string identifying the backend kind for diagnostics.
Sourcepub async fn file_identity(&self, cx: &Cx) -> Result<Option<FileIdentity>>
pub async fn file_identity(&self, cx: &Cx) -> Result<Option<FileIdentity>>
Return the identity of the already-open main database file.
Trait Implementations§
Source§impl Clone for PagerBackend
impl Clone for PagerBackend
Source§fn clone(&self) -> PagerBackend
fn clone(&self) -> PagerBackend
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more