pub struct TupleType(/* private fields */);Expand description
(T1, T2, ...) tuple type. Sits inside a TypeNode-shaped
position (typed dict field, generic argument list, closure
parameter, schema-method param).
Implementations§
Source§impl TupleType
impl TupleType
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 TupleType
impl StructuralPartialEq for TupleType
Auto Trait Implementations§
impl !RefUnwindSafe for TupleType
impl !Send for TupleType
impl !Sync for TupleType
impl !UnwindSafe for TupleType
impl Freeze for TupleType
impl Unpin for TupleType
impl UnsafeUnpin for TupleType
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