pub struct StringText<T: TreeToken = SyntaxToken>(/* private fields */);Expand description
Represents a textual part of a string.
Implementations§
Source§impl<T: TreeToken> StringText<T>
impl<T: TreeToken> StringText<T>
Sourcepub fn unescape_to(&self, buffer: &mut String)
pub fn unescape_to(&self, buffer: &mut String)
Unescapes the string text to the given buffer.
If the string text contains invalid escape sequences, they are left as-is.
Trait Implementations§
Source§impl<T: TreeToken> AstToken<T> for StringText<T>
impl<T: TreeToken> AstToken<T> for StringText<T>
Source§fn can_cast(kind: SyntaxKind) -> bool
fn can_cast(kind: SyntaxKind) -> bool
Determines if the kind can be cast to this representation.
Source§fn kind(&self) -> SyntaxKind
fn kind(&self) -> SyntaxKind
Gets the syntax kind of the token.
Source§impl<T: Clone + TreeToken> Clone for StringText<T>
impl<T: Clone + TreeToken> Clone for StringText<T>
Source§fn clone(&self) -> StringText<T>
fn clone(&self) -> StringText<T>
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 moreimpl<T: Eq + TreeToken> Eq for StringText<T>
impl<T: PartialEq + TreeToken> StructuralPartialEq for StringText<T>
Auto Trait Implementations§
impl<T> Freeze for StringText<T>where
T: Freeze,
impl<T> RefUnwindSafe for StringText<T>where
T: RefUnwindSafe,
impl<T> Send for StringText<T>where
T: Send,
impl<T> Sync for StringText<T>where
T: Sync,
impl<T> Unpin for StringText<T>where
T: Unpin,
impl<T> UnsafeUnpin for StringText<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for StringText<T>where
T: UnwindSafe,
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§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.