pub enum IndexArg<P: Phase = Raw> {
Variant {
index: Spanned<NamePath>,
variant: Spanned<IndexVariantName>,
},
Var(Ident),
Expr(Box<Expr<P>>),
}Expand description
An argument in an index access: a qualified variant, a loop variable, or an expression.
Variants§
Variant
Qualified variant: Maneuver.Departure or module.Maneuver.Departure
Var(Ident)
Loop variable: m
Expr(Box<Expr<P>>)
Arbitrary expression: i + 1, i - M
Trait Implementations§
Source§impl FormatEquivalent for IndexArg
impl FormatEquivalent for IndexArg
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<P> Freeze for IndexArg<P>
impl<P> RefUnwindSafe for IndexArg<P>
impl<P> Send for IndexArg<P>
impl<P> Sync for IndexArg<P>
impl<P> Unpin for IndexArg<P>
impl<P> UnsafeUnpin for IndexArg<P>
impl<P> UnwindSafe for IndexArg<P>
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