pub enum IndexDeclKind<P: Phase = Raw> {
Named {
variants: Vec<Spanned<IndexVariantName>>,
},
Range {
start: Box<Expr<P>>,
end: Box<Expr<P>>,
step: Box<Expr<P>>,
},
RequiredNamed,
RequiredRange {
dimension: DimExpr,
},
}Variants§
Named
Named variants: { Departure, Correction, Insertion }
Fields
§
variants: Vec<Spanned<IndexVariantName>>Range
Numeric range: linspace(start, end, step: step)
RequiredNamed
Required named index (no variants): index Foo;
Must be bound via parameterized import.
RequiredRange
Required range index with dimension constraint: index Foo: Time;
Must be bound via parameterized import.
Implementations§
Source§impl<P: Phase> IndexDeclKind<P>
impl<P: Phase> IndexDeclKind<P>
Sourcepub const fn is_required(&self) -> bool
pub const fn is_required(&self) -> bool
Returns true for required index declarations that must be bound via import.
Trait Implementations§
Source§impl<P: Clone + Phase> Clone for IndexDeclKind<P>
impl<P: Clone + Phase> Clone for IndexDeclKind<P>
Source§fn clone(&self) -> IndexDeclKind<P>
fn clone(&self) -> IndexDeclKind<P>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl FormatEquivalent for IndexDeclKind
impl FormatEquivalent for IndexDeclKind
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.Source§impl From<IndexDeclKind> for IndexDeclKind<Desugared>
impl From<IndexDeclKind> for IndexDeclKind<Desugared>
Source§fn from(k: IndexDeclKind<Raw>) -> Self
fn from(k: IndexDeclKind<Raw>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<P> Freeze for IndexDeclKind<P>
impl<P> RefUnwindSafe for IndexDeclKind<P>
impl<P> Send for IndexDeclKind<P>
impl<P> Sync for IndexDeclKind<P>
impl<P> Unpin for IndexDeclKind<P>
impl<P> UnsafeUnpin for IndexDeclKind<P>
impl<P> UnwindSafe for IndexDeclKind<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