pub struct StringLit(/* private fields */);Implementations§
Source§impl StringLit
impl StringLit
Sourcepub fn quote(&self) -> Option<char>
pub fn quote(&self) -> Option<char>
The opening quote character if this is a "- or '-quoted string
literal (not a backtick-quoted name). None otherwise.
Sourcepub fn inner(&self) -> Option<&str>
pub fn inner(&self) -> Option<&str>
Raw text between the quotes (escapes intact) for a "/'-quoted string;
None for a backtick-quoted name. Subsumes the inner half of the old
matchers::string_literal.
Sourcepub fn is_backtick(&self) -> bool
pub fn is_backtick(&self) -> bool
Whether this is a backtick-quoted name (`x`).
Trait Implementations§
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