pub struct ElseBranch { /* private fields */ }Implementations§
Source§impl ElseBranch
impl ElseBranch
Sourcepub fn choice_body(&self) -> Option<ChoiceBody>
pub fn choice_body(&self) -> Option<ChoiceBody>
The nested CHOICE_BODY, when this else belongs to a choice point
(choice.rs::else_branch — always braced, no colon form).
Sourcepub fn block(&self) -> Option<Block>
pub fn block(&self) -> Option<Block>
The nested BLOCK, when this else belongs to the conditional
family’s braced-arm form ({if cond {…} else {…}}).
Sourcepub fn items(&self) -> impl Iterator<Item = SyntaxNode>
pub fn items(&self) -> impl Iterator<Item = SyntaxNode>
Every direct-child item, for the conditional family’s colon-body
form ({if cond: … else: …}), where body items are direct children
with no wrapper node (family.rs::colon_body).
Trait Implementations§
Source§impl AstNode for ElseBranch
impl AstNode for ElseBranch
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.Source§impl Clone for ElseBranch
impl Clone for ElseBranch
Source§fn clone(&self) -> ElseBranch
fn clone(&self) -> ElseBranch
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ElseBranch
impl Debug for ElseBranch
Source§impl Display for ElseBranch
impl Display for ElseBranch
impl Eq for ElseBranch
Source§impl Hash for ElseBranch
impl Hash for ElseBranch
Source§impl PartialEq for ElseBranch
impl PartialEq for ElseBranch
impl StructuralPartialEq for ElseBranch
Auto Trait Implementations§
impl !RefUnwindSafe for ElseBranch
impl !Send for ElseBranch
impl !Sync for ElseBranch
impl !UnwindSafe for ElseBranch
impl Freeze for ElseBranch
impl Unpin for ElseBranch
impl UnsafeUnpin for ElseBranch
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