pub struct CollectionDescriptor {
pub collection_id: u32,
pub primary_root: u64,
pub type_version: u32,
pub next_id: u64,
pub indexes: Vec<IndexDescriptor>,
}Expand description
On-disk description of a collection.
Encoded with postcard as the value of a catalog B-tree row.
The exact shape is documented in docs/format.md § Catalog.
Fields§
§collection_id: u32Catalog-assigned numeric id for this collection.
primary_root: u64Page-id of the collection’s primary B-tree root.
type_version: u32Current Document::VERSION for the collection’s type.
next_id: u64Next-id watermark — the next Id the allocator will
hand out for this collection.
indexes: Vec<IndexDescriptor>Secondary indexes. Empty in M5; populated in M7.
Implementations§
Source§impl CollectionDescriptor
impl CollectionDescriptor
Sourcepub const fn new(
collection_id: u32,
primary_root: u64,
type_version: u32,
) -> Self
pub const fn new( collection_id: u32, primary_root: u64, type_version: u32, ) -> Self
Construct a descriptor for a freshly-registered collection.
primary_root is the page-id of the collection’s empty
primary B-tree (allocated by the caller before
Catalog::insert); collection_id is the value the
catalog will assign.
Trait Implementations§
Source§impl Clone for CollectionDescriptor
impl Clone for CollectionDescriptor
Source§fn clone(&self) -> CollectionDescriptor
fn clone(&self) -> CollectionDescriptor
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CollectionDescriptor
impl Debug for CollectionDescriptor
Source§impl<'de> Deserialize<'de> for CollectionDescriptor
impl<'de> Deserialize<'de> for CollectionDescriptor
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
Source§impl PartialEq for CollectionDescriptor
impl PartialEq for CollectionDescriptor
Source§fn eq(&self, other: &CollectionDescriptor) -> bool
fn eq(&self, other: &CollectionDescriptor) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for CollectionDescriptor
impl Serialize for CollectionDescriptor
impl Eq for CollectionDescriptor
impl StructuralPartialEq for CollectionDescriptor
Auto Trait Implementations§
impl Freeze for CollectionDescriptor
impl RefUnwindSafe for CollectionDescriptor
impl Send for CollectionDescriptor
impl Sync for CollectionDescriptor
impl Unpin for CollectionDescriptor
impl UnsafeUnpin for CollectionDescriptor
impl UnwindSafe for CollectionDescriptor
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