pub enum AnyString {
ByteString(ByteString),
CString(CString),
String(String),
}Variants§
Implementations§
Trait Implementations§
Source§impl AstToken for AnyString
impl AstToken for AnyString
fn can_cast(kind: SyntaxKind) -> bool
fn cast(syntax: SyntaxToken<RustLanguage>) -> Option<AnyString>
fn syntax(&self) -> &SyntaxToken<RustLanguage>
fn text(&self) -> &str
Source§impl IsString for AnyString
impl IsString for AnyString
fn raw_prefix(&self) -> &'static str
fn unescape( &self, s: &str, callback: impl FnMut(Range<usize>, Result<char, EscapeError>), )
fn is_raw(&self) -> bool
fn quote_offsets(&self) -> Option<QuoteOffsets>
fn text_range_between_quotes(&self) -> Option<TextRange>
fn text_without_quotes(&self) -> &str
fn open_quote_text_range(&self) -> Option<TextRange>
fn close_quote_text_range(&self) -> Option<TextRange>
fn escaped_char_ranges( &self, cb: &mut dyn FnMut(TextRange, Result<char, EscapeError>), )
fn map_range_up(&self, range: TextRange) -> Option<TextRange>
fn map_offset_down(&self, offset: TextSize) -> Option<TextSize>
Auto Trait Implementations§
impl !RefUnwindSafe for AnyString
impl !Send for AnyString
impl !Sync for AnyString
impl !UnwindSafe for AnyString
impl Freeze for AnyString
impl Unpin for AnyString
impl UnsafeUnpin for AnyString
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more