pub struct ConstDef { /* private fields */ }Expand description
A ConstDef node (family.ungram rule ConstDef).
Implementations§
Source§impl ConstDef
impl ConstDef
pub fn name(&self) -> Option<Name>
pub fn type_ref(&self) -> Option<PathType>
pub fn value(&self) -> Option<Literal>
pub fn internal_token(&self) -> Option<SyntaxToken>
pub fn error_token(&self) -> Option<SyntaxToken>
pub fn const_token(&self) -> Option<SyntaxToken>
pub fn colon_token(&self) -> Option<SyntaxToken>
pub fn eq_token(&self) -> Option<SyntaxToken>
Trait Implementations§
Source§impl AstNode for ConstDef
impl AstNode for ConstDef
Source§fn cast(syntax: SyntaxNode) -> Option<Self>
fn cast(syntax: SyntaxNode) -> Option<Self>
Wraps
syntax if its kind matches this type; None otherwise.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
The underlying untyped node.
impl Eq for ConstDef
Source§impl HasDocComments for ConstDef
impl HasDocComments for ConstDef
Source§fn doc_comments(&self) -> Vec<SyntaxToken> ⓘ
fn doc_comments(&self) -> Vec<SyntaxToken> ⓘ
The
DocComment tokens in the trivia run immediately preceding
this node, in source order.Source§impl HasModifiers for ConstDef
impl HasModifiers for ConstDef
impl StructuralPartialEq for ConstDef
Auto Trait Implementations§
impl !RefUnwindSafe for ConstDef
impl !Send for ConstDef
impl !Sync for ConstDef
impl !UnwindSafe for ConstDef
impl Freeze for ConstDef
impl Unpin for ConstDef
impl UnsafeUnpin for ConstDef
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