pub struct WhileStmt { /* private fields */ }Implementations§
Source§impl WhileStmt
impl WhileStmt
Sourcepub fn condition(&self) -> Option<SyntaxNode>
pub fn condition(&self) -> Option<SyntaxNode>
The loop condition — WHILE_STMT’s only child node that isn’t the
STMT_BLOCK body or the AS_BINDING suffix.
Sourcepub fn as_binding(&self) -> Option<AsBinding>
pub fn as_binding(&self) -> Option<AsBinding>
The as NAME binding (B1b, issue #1475), when the condition carries
one. Rebinds on every iteration — the condition (and with it this
binding) is re-evaluated per pass.
pub fn body(&self) -> Option<StmtBlock>
Trait Implementations§
Source§impl AstNode for WhileStmt
impl AstNode for WhileStmt
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 WhileStmt
impl StructuralPartialEq for WhileStmt
Auto Trait Implementations§
impl !RefUnwindSafe for WhileStmt
impl !Send for WhileStmt
impl !Sync for WhileStmt
impl !UnwindSafe for WhileStmt
impl Freeze for WhileStmt
impl Unpin for WhileStmt
impl UnsafeUnpin for WhileStmt
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