pub struct Catalog { /* private fields */ }Expand description
Every table a native file holds, without the directory of any of them.
This is what opening a database reads. It is the small level of the directory, so the cost is proportional to how many tables there are rather than to how much data they hold, and a session that touches two tables of eight decodes two table directories.
The file handle is shared with every reader this hands out. Eight tables in one file is one open file descriptor, not eight, which is the other thing one file buys over a file per table.
Implementations§
Source§impl Catalog
impl Catalog
Sourcepub fn open(path: impl AsRef<Path>) -> Result<Self>
pub fn open(path: impl AsRef<Path>) -> Result<Self>
Reads the highest valid catalog slot and nothing under it.
§Errors
If the file has no valid committed catalog or a catalog pointer is out of bounds.
Sourcepub fn names(&self) -> impl ExactSizeIterator<Item = &str>
pub fn names(&self) -> impl ExactSizeIterator<Item = &str>
The tables in the file, in the order they were written.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Catalog
impl RefUnwindSafe for Catalog
impl Send for Catalog
impl Sync for Catalog
impl Unpin for Catalog
impl UnsafeUnpin for Catalog
impl UnwindSafe for Catalog
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