#[non_exhaustive]pub struct DbStat {
pub format_major: u16,
pub format_minor: u16,
pub page_size: u16,
pub page_count: u64,
pub file_size_bytes: u64,
pub collections: Vec<CollectionStat>,
}Expand description
One-shot snapshot of a database’s header + catalog summary.
Returned by Db::stat. CLI-facing — may evolve pre-1.0; user
code should reach for the typed Db::iter_all /
Db::read_transaction(|tx| tx.collection::<T>()) APIs instead.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.format_major: u16Format major version from page 0.
format_minor: u16Format minor version from page 0.
page_size: u16On-disk page size in bytes.
page_count: u64Total number of pages in the database, including page 0.
file_size_bytes: u64Logical file size in bytes (page_count * page_size). For
file-backed pagers this equals the on-disk size; for memory
pagers it is the in-memory backing buffer length.
collections: Vec<CollectionStat>One entry per registered collection. Order matches the catalog B-tree’s natural sort (by name).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DbStat
impl<'de> Deserialize<'de> for DbStat
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DbStat
impl RefUnwindSafe for DbStat
impl Send for DbStat
impl Sync for DbStat
impl Unpin for DbStat
impl UnsafeUnpin for DbStat
impl UnwindSafe for DbStat
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