Enum rustc_lexer::unescape::Mode
source · pub enum Mode {
Char,
Byte,
Str,
RawStr,
ByteStr,
RawByteStr,
CStr,
RawCStr,
}
Expand description
What kind of literal do we parse.
Variants§
Implementations§
source§impl Mode
impl Mode
pub fn in_double_quotes(self) -> bool
sourcefn allow_high_bytes(self) -> bool
fn allow_high_bytes(self) -> bool
Are \x80
..\xff
allowed?
sourcefn allow_unicode_chars(self) -> bool
fn allow_unicode_chars(self) -> bool
Are unicode (non-ASCII) chars allowed?
sourcefn allow_unicode_escapes(self) -> bool
fn allow_unicode_escapes(self) -> bool
Are unicode escapes (\u
) allowed?
pub fn prefix_noraw(self) -> &'static str
Trait Implementations§
impl Copy for Mode
impl StructuralPartialEq for Mode
Auto Trait Implementations§
impl Freeze for Mode
impl RefUnwindSafe for Mode
impl Send for Mode
impl Sync for Mode
impl Unpin for Mode
impl UnwindSafe for Mode
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 1 byte
Size for each variant:
Char
: 0 bytesByte
: 0 bytesStr
: 0 bytesRawStr
: 0 bytesByteStr
: 0 bytesRawByteStr
: 0 bytesCStr
: 0 bytesRawCStr
: 0 bytes