pub struct CapturedExpr(/* private fields */);Implementations§
Source§impl CapturedExpr
impl CapturedExpr
pub fn cast(node: SyntaxNode) -> Option<Self>
pub fn can_cast(kind: SyntaxKind) -> bool
pub fn as_cst(&self) -> &SyntaxNode
pub fn text_range(&self) -> TextRange
Source§impl CapturedExpr
impl CapturedExpr
Sourcepub fn name(&self) -> Option<SyntaxToken>
pub fn name(&self) -> Option<SyntaxToken>
Returns the capture token (@name or @_name). The token text includes the @ prefix.
Sourcepub fn is_suppressive(&self) -> bool
pub fn is_suppressive(&self) -> bool
Returns true if this is a suppressive capture (@_ or @_name). Suppressive captures match structurally but don’t contribute to output.
pub fn inner(&self) -> Option<Expr>
pub fn type_annotation(&self) -> Option<Type>
Sourcepub fn has_string_annotation(&self) -> bool
pub fn has_string_annotation(&self) -> bool
Returns true if this capture has a :: string type annotation.
Trait Implementations§
Source§impl Clone for CapturedExpr
impl Clone for CapturedExpr
Source§fn clone(&self) -> CapturedExpr
fn clone(&self) -> CapturedExpr
Returns a duplicate of the value. Read more
1.0.0 · 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 CapturedExpr
impl Debug for CapturedExpr
Source§impl Hash for CapturedExpr
impl Hash for CapturedExpr
Source§impl PartialEq for CapturedExpr
impl PartialEq for CapturedExpr
impl Eq for CapturedExpr
impl StructuralPartialEq for CapturedExpr
Auto Trait Implementations§
impl Freeze for CapturedExpr
impl !RefUnwindSafe for CapturedExpr
impl !Send for CapturedExpr
impl !Sync for CapturedExpr
impl Unpin for CapturedExpr
impl !UnwindSafe for CapturedExpr
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.