pub struct MatchArm(/* private fields */);Implementations§
Source§impl MatchArm
impl MatchArm
Sourcepub fn cast(node: SyntaxNode) -> Option<Self>
pub fn cast(node: SyntaxNode) -> Option<Self>
Wrap node if its SyntaxKind matches; otherwise
return None. O(1) — just a kind check.
Sourcepub fn syntax(&self) -> &SyntaxNode
pub fn syntax(&self) -> &SyntaxNode
Borrow the underlying SyntaxNode. Useful for
downstream traversals that want CST-level access.
Trait Implementations§
impl Eq for MatchArm
impl StructuralPartialEq for MatchArm
Auto Trait Implementations§
impl !RefUnwindSafe for MatchArm
impl !Send for MatchArm
impl !Sync for MatchArm
impl !UnwindSafe for MatchArm
impl Freeze for MatchArm
impl Unpin for MatchArm
impl UnsafeUnpin for MatchArm
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