pub struct LetStmt { /* private fields */ }Implementations§
Source§impl LetStmt
impl LetStmt
pub fn name_token(&self) -> Option<SyntaxToken>
Sourcepub fn value(&self) -> Option<SyntaxNode>
pub fn value(&self) -> Option<SyntaxNode>
The initializer expression’s root node, if the = clause was
present (optional, see parser/stmt.rs::let_stmt’s doc comment).
Sourcepub fn type_annotation(&self) -> Option<TypeAnnotation>
pub fn type_annotation(&self) -> Option<TypeAnnotation>
The binding’s : type annotation, if written (NG-B, #1488).
Trait Implementations§
Source§impl AstNode for LetStmt
impl AstNode for LetStmt
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Returns
true for a node with a SyntaxKind this type can wrap.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 LetStmt
impl StructuralPartialEq for LetStmt
Auto Trait Implementations§
impl !RefUnwindSafe for LetStmt
impl !Send for LetStmt
impl !Sync for LetStmt
impl !UnwindSafe for LetStmt
impl Freeze for LetStmt
impl Unpin for LetStmt
impl UnsafeUnpin for LetStmt
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