pub enum IndexExpr {
Name(Spanned<NamePath>),
NatExpr(NatExpr),
}Expand description
A type expression (dimension annotation on declarations). An expression in index position of an indexed type.
In Velocity[Maneuver] or Velocity[module.Maneuver], the index path is
an IndexExpr::Name.
In Dimensionless[3, 4], 3 and 4 are IndexExpr::NatExpr(NatExpr::Literal(..)).
In D[N + 1], N + 1 is an IndexExpr::NatExpr.
Variants§
Name(Spanned<NamePath>)
A named index or generic parameter path: Maneuver, I, N, module.Maneuver
NatExpr(NatExpr)
A type-level natural-number expression in index position: 3, N + 1, M + N.
Implementations§
Trait Implementations§
Source§impl FormatEquivalent for IndexExpr
impl FormatEquivalent for IndexExpr
Source§fn format_equivalent(&self, other: &Self) -> bool
fn format_equivalent(&self, other: &Self) -> bool
Returns
true if self and other are equivalent up to formatting.Auto Trait Implementations§
impl Freeze for IndexExpr
impl RefUnwindSafe for IndexExpr
impl Send for IndexExpr
impl Sync for IndexExpr
impl Unpin for IndexExpr
impl UnsafeUnpin for IndexExpr
impl UnwindSafe for IndexExpr
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