pub struct IndexDef {
pub name: IndexName,
pub kind: IndexKind,
}Expand description
A declared index with its ordered variants.
Fields§
§name: IndexName§kind: IndexKindImplementations§
Source§impl IndexDef
impl IndexDef
Sourcepub fn variants(&self) -> Vec<IndexVariantName> ⓘ
pub fn variants(&self) -> Vec<IndexVariantName> ⓘ
Returns the ordered variant names for this index.
For named indexes, returns the declared variants.
For range indexes, generates synthetic names like "#0", "#1", etc.
For nat range indexes, generates synthetic names like "#0", "#1", etc.
For required indexes, returns an empty vec (no variants until bound).
Sourcepub const fn step_count(&self) -> usize
pub const fn step_count(&self) -> usize
Returns the number of steps/variants in this index.
Returns 0 for required indexes (no variants until bound).
Sourcepub const fn range_data(&self) -> Option<&RangeIndexData>
pub const fn range_data(&self) -> Option<&RangeIndexData>
Returns the range data if this is a concrete range index.
Sourcepub const fn is_range(&self) -> bool
pub const fn is_range(&self) -> bool
Returns true if this is a range index (concrete or required, not nat range).
Sourcepub const fn is_named(&self) -> bool
pub const fn is_named(&self) -> bool
Returns true if this is a named index (concrete or required).
Sourcepub const fn is_nat_range(&self) -> bool
pub const fn is_nat_range(&self) -> bool
Returns true if this is a nat range index.
Sourcepub const fn nat_range_size(&self) -> Option<u64>
pub const fn nat_range_size(&self) -> Option<u64>
Returns the nat range size, if this is a nat range index.
Sourcepub const fn is_required(&self) -> bool
pub const fn is_required(&self) -> bool
Returns true if this is a required index (must be bound via parameterized import).