pub struct IndexDescriptor {
pub index_id: u32,
pub name: String,
pub kind: IndexKind,
pub key_paths: Vec<String>,
pub root_page_id: u64,
pub status: IndexStatus,
}Expand description
On-disk descriptor for a secondary index attached to a collection.
Persisted inside the owning CollectionDescriptor::indexes
vector as part of the catalog row’s postcard payload. The wire
shape is documented in docs/format.md § Indexes; format-minor
bumped to 2 in M7.
Fields§
§index_id: u32Catalog-assigned numeric id for this index. Stable across
reopens; never reused — a DroppedPending descriptor
retains its index_id so the page reclamation pass on the
next checkpoint does not race with concurrent readers.
name: StringUser-visible name. Stable across reopens; the reconciler
matches a runtime IndexSpec to a stored descriptor by
this name.
kind: IndexKindDiscriminator for the kind of index. See
crate::index::IndexKind.
key_paths: Vec<String>Field path(s) the index is keyed by. Single-element for
Standard / Unique / Each; ≥ 2 for Composite.
root_page_id: u64Page-id of the index B+tree’s root.
status: IndexStatusLifecycle status — see IndexStatus.
Trait Implementations§
Source§impl Clone for IndexDescriptor
impl Clone for IndexDescriptor
Source§fn clone(&self) -> IndexDescriptor
fn clone(&self) -> IndexDescriptor
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for IndexDescriptor
impl Debug for IndexDescriptor
Source§impl<'de> Deserialize<'de> for IndexDescriptor
impl<'de> Deserialize<'de> for IndexDescriptor
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>,
Source§impl PartialEq for IndexDescriptor
impl PartialEq for IndexDescriptor
Source§fn eq(&self, other: &IndexDescriptor) -> bool
fn eq(&self, other: &IndexDescriptor) -> bool
self and other values to be equal, and is used by ==.