pub enum DeclKind<P: Phase = Raw> {
Show 16 variants
Param(ParamDecl<P>),
Node(NodeDecl<P>),
ConstNode(ConstNodeDecl<P>),
BaseDimension(BaseDimDecl),
Dimension(DimDecl),
Unit(UnitDecl<P>),
Type(TypeDecl<P>),
Index(IndexDecl<P>),
Import(ImportDecl),
Include(IncludeDecl<P>),
Dag(DagDecl<P>),
Assert(AssertDecl<P>),
Plot(PlotDecl<P>),
Figure(FigureDecl<P>),
Layer(LayerDecl<P>),
Sugar(P::DeclSugar),
}Variants§
Param(ParamDecl<P>)
Node(NodeDecl<P>)
ConstNode(ConstNodeDecl<P>)
BaseDimension(BaseDimDecl)
Dimension(DimDecl)
Unit(UnitDecl<P>)
Type(TypeDecl<P>)
Index(IndexDecl<P>)
Import(ImportDecl)
Include(IncludeDecl<P>)
Dag(DagDecl<P>)
Assert(AssertDecl<P>)
Plot(PlotDecl<P>)
Figure(FigureDecl<P>)
Layer(LayerDecl<P>)
Sugar(P::DeclSugar)
Phase-specific declaration sugar.
In Raw, this is crate::syntax::ast::RawDeclSugar and carries
surface forms like multi-decl (issue #481) that are eliminated by the
desugar pass. In Desugared, the
payload is core::convert::Infallible — the variant is statically
unreachable, so post-desugar consumers handle it with
crate::syntax::phase::never.
Implementations§
Trait Implementations§
Source§impl FormatEquivalent for DeclKind
impl FormatEquivalent for DeclKind
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 DeclKind<P>
impl<P> RefUnwindSafe for DeclKind<P>
impl<P> Send for DeclKind<P>
impl<P> Sync for DeclKind<P>
impl<P> Unpin for DeclKind<P>
impl<P> UnsafeUnpin for DeclKind<P>
impl<P> UnwindSafe for DeclKind<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