pub enum IndexKind {
Named {
variants: Vec<IndexVariantName>,
},
Range(RangeIndexData),
RequiredNamed,
RequiredRange {
dimension: Dimension,
},
NatRange {
size: NonZeroUsize,
},
}Expand description
The kind of an index: either named variants or a numeric range.
Variants§
Named
A named label set, e.g. index Maneuver = { Departure, Correction, Insertion };
Fields
§
variants: Vec<IndexVariantName>Range(RangeIndexData)
A numeric range, e.g. index T = linspace(0.0 s, 100.0 s, step: 0.1 s);
RequiredNamed
Required named index (no variants): must be bound via parameterized import.
RequiredRange
Required range index with dimension constraint: must be bound via parameterized import.
NatRange
A Nat-parameterized range: range(N) with elements {0, 1, ..., N-1}.
Created synthetically for integer literals in index position (e.g., D[3]).
Fields
§
size: NonZeroUsizeThe non-zero size of the range (number of elements). Stored as
usize because it bounds in-memory variant tables; AST-level Nat
literals are converted at the registry boundary.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for IndexKind
impl RefUnwindSafe for IndexKind
impl Send for IndexKind
impl Sync for IndexKind
impl Unpin for IndexKind
impl UnsafeUnpin for IndexKind
impl UnwindSafe for IndexKind
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