pub enum StrKind {
Narrow,
Utf8,
Utf16,
Utf32,
Wide,
}Expand description
Which prefix a character constant or string literal was written with.
The five of them are the same set for both, which is why one enum serves
both: 'x'/"…", u8'x'/u8"…", u'x'/u"…", U'x'/U"…" and
L'x'/L"…".
Variants§
Narrow
"…" — bytes of the execution character set, which is UTF-8.
Utf8
u8"…" (C11) and u8'x' (C23) — UTF-8 bytes, of type char before
C23 and char8_t (an unsigned char) from C23 on.
Utf16
u"…" and u'x' (C11) — UTF-16 code units, of type char16_t.
Utf32
U"…" and U'x' (C11) — UTF-32 code units, of type char32_t.
Wide
L"…" — wchar_t.
Implementations§
Trait Implementations§
impl Copy for StrKind
impl Eq for StrKind
impl StructuralPartialEq for StrKind
Auto Trait Implementations§
impl Freeze for StrKind
impl RefUnwindSafe for StrKind
impl Send for StrKind
impl Sync for StrKind
impl Unpin for StrKind
impl UnsafeUnpin for StrKind
impl UnwindSafe for StrKind
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