pub struct StringLiteral {
pub content: Range<usize>,
pub end: usize,
pub quote: char,
}Expand description
A string literal read from source text: its raw content span, the position just past its closing delimiter, and which character delimited it.
content excludes both delimiters and is the raw source span — escape sequences
inside it (e.g. \' in o\'brien) are left intact, not unescaped. Byte offsets in
content are absolute within the text passed to read_string_literal, so callers
can feed them directly to LSP byte-to-position conversion; unescaping, where a caller
needs it, is ecosystem-specific and out of scope here.
Fields§
§content: Range<usize>Byte range of the literal’s content, excluding both delimiters.
end: usizeByte offset just past the closing delimiter.
quote: charThe delimiter character (" or ') that opened, and must close, this literal.
Trait Implementations§
Source§impl Clone for StringLiteral
impl Clone for StringLiteral
Source§impl Debug for StringLiteral
impl Debug for StringLiteral
impl Eq for StringLiteral
Source§impl PartialEq for StringLiteral
impl PartialEq for StringLiteral
impl StructuralPartialEq for StringLiteral
Auto Trait Implementations§
impl Freeze for StringLiteral
impl RefUnwindSafe for StringLiteral
impl Send for StringLiteral
impl Sync for StringLiteral
impl Unpin for StringLiteral
impl UnsafeUnpin for StringLiteral
impl UnwindSafe for StringLiteral
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.