pub struct Comprehension(/* private fields */);Implementations§
Source§impl Comprehension
impl Comprehension
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§
Source§impl Clone for Comprehension
impl Clone for Comprehension
Source§fn clone(&self) -> Comprehension
fn clone(&self) -> Comprehension
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 Comprehension
impl Debug for Comprehension
impl Eq for Comprehension
Source§impl Hash for Comprehension
impl Hash for Comprehension
Source§impl PartialEq for Comprehension
impl PartialEq for Comprehension
Source§fn eq(&self, other: &Comprehension) -> bool
fn eq(&self, other: &Comprehension) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for Comprehension
Auto Trait Implementations§
impl !RefUnwindSafe for Comprehension
impl !Send for Comprehension
impl !Sync for Comprehension
impl !UnwindSafe for Comprehension
impl Freeze for Comprehension
impl Unpin for Comprehension
impl UnsafeUnpin for Comprehension
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