pub struct Tuple(/* private fields */);Expand description
(e1, e2, ...) tuple value literal. () is the unit tuple
(no children); (e,) the trailing-comma 1-tuple. A bare
grouping (e) is NOT a tuple and never produces this node.
Implementations§
Source§impl Tuple
impl Tuple
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 Tuple
impl StructuralPartialEq for Tuple
Auto Trait Implementations§
impl !RefUnwindSafe for Tuple
impl !Send for Tuple
impl !Sync for Tuple
impl !UnwindSafe for Tuple
impl Freeze for Tuple
impl Unpin for Tuple
impl UnsafeUnpin for Tuple
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