pub struct Catalog { /* private fields */ }Expand description
Logical catalog: collection names, ids, and current schema version per collection.
Implementations§
Source§impl Catalog
impl Catalog
Sourcepub fn next_collection_id(&self) -> CollectionId
pub fn next_collection_id(&self) -> CollectionId
Next collection id that will be assigned (replay must produce sequential creates 1..n).
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn get(&self, id: CollectionId) -> Option<&CollectionInfo>
Sourcepub fn lookup_name(&self, name: &str) -> Option<CollectionId>
pub fn lookup_name(&self, name: &str) -> Option<CollectionId>
Resolve a registered collection by name (trimmed, matching Database::register_collection).
pub fn collection_names(&self) -> Vec<String>
pub fn collections(&self) -> Vec<CollectionInfo>
Sourcepub fn has_top_level_field(fields: &[FieldDef], name: &str) -> bool
pub fn has_top_level_field(fields: &[FieldDef], name: &str) -> bool
true if name is a single-segment path on a top-level field.
Sourcepub fn apply_record(&mut self, record: CatalogRecordWire) -> Result<(), DbError>
pub fn apply_record(&mut self, record: CatalogRecordWire) -> Result<(), DbError>
Apply one catalog record (from replay or after a local append).
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