pub struct StringLit { /* private fields */ }Implementations§
Source§impl StringLit
impl StringLit
Sourcepub fn raw_text(&self) -> String
pub fn raw_text(&self) -> String
Returns the raw content between the quotes (excluding the quotes themselves).
The opening quote is always present (the parser enters string_literal
only on a QUOTE token). The closing quote may be absent if the string
is unterminated — the parser emits an error and closes the node without
consuming a trailing QUOTE. The strip_suffix fallback handles that
error-recovery case.
Trait Implementations§
Source§impl AstNode for StringLit
impl AstNode for StringLit
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Returns
true if a node with the given kind can be cast to Self.Source§fn cast(node: SyntaxNode) -> Option<Self>
fn cast(node: SyntaxNode) -> Option<Self>
Try to cast a generic
SyntaxNode into this typed wrapper.Source§fn syntax(&self) -> &SyntaxNode
fn syntax(&self) -> &SyntaxNode
Access the underlying
SyntaxNode.impl Eq for StringLit
impl StructuralPartialEq for StringLit
Auto Trait Implementations§
impl !RefUnwindSafe for StringLit
impl !Send for StringLit
impl !Sync for StringLit
impl !UnwindSafe for StringLit
impl Freeze for StringLit
impl Unpin for StringLit
impl UnsafeUnpin for StringLit
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