pub struct ConstDecl { /* private fields */ }Implementations§
Source§impl ConstDecl
impl ConstDecl
pub fn identifier(&self) -> Option<Identifier>
pub fn name(&self) -> Option<String>
Sourcepub fn type_annotation(&self) -> Option<TypeAnnotation>
pub fn type_annotation(&self) -> Option<TypeAnnotation>
The declared type annotation (TM-2, docs/typed-mode-spec.md §3:
CONST name: type = expr), if present.
Trait Implementations§
Source§impl AstNode for ConstDecl
impl AstNode for ConstDecl
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Returns
true if a node with the given kind can be cast to Self.Source§fn cast(node: SyntaxNode) -> Option<Self>
fn cast(node: SyntaxNode) -> Option<Self>
Try to cast a generic
SyntaxNode into this typed wrapper.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
Access the underlying
SyntaxNode.impl Eq for ConstDecl
impl StructuralPartialEq for ConstDecl
Auto Trait Implementations§
impl !RefUnwindSafe for ConstDecl
impl !Send for ConstDecl
impl !Sync for ConstDecl
impl !UnwindSafe for ConstDecl
impl Freeze for ConstDecl
impl Unpin for ConstDecl
impl UnsafeUnpin for ConstDecl
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