#[non_exhaustive]pub enum Decl {
Template(TemplateDecl),
Interface(InterfaceDecl),
Function(FunctionDecl),
TypeDef {
keyword: String,
name: Identifier,
pos: Pos,
span: Span,
},
Fixity(FixityDecl),
UnsupportedSyntax {
kind: UnsupportedSyntaxKind,
raw: String,
pos: Pos,
span: Span,
},
Unknown {
raw: String,
pos: Pos,
span: Span,
},
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Template(TemplateDecl)
Template declaration.
Interface(InterfaceDecl)
Interface declaration.
Function(FunctionDecl)
Function signature/equations grouped by name.
TypeDef
data/type/class/instance/exception — recorded with name + span.
Fields
§
name: IdentifierDeclared type/class/instance name as parsed.
Fixity(FixityDecl)
Top-level fixity declaration.
UnsupportedSyntax
Top-level syntax the parser recognizes but intentionally does not model.
Fields
§
kind: UnsupportedSyntaxKindWhy the declaration is unsupported.
Unknown
Anything unparseable at the top level (diagnostic already emitted).
Trait Implementations§
impl Eq for Decl
impl StructuralPartialEq for Decl
Auto Trait Implementations§
impl Freeze for Decl
impl RefUnwindSafe for Decl
impl Send for Decl
impl Sync for Decl
impl Unpin for Decl
impl UnsafeUnpin for Decl
impl UnwindSafe for Decl
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