pub enum Utf8 {}Expand description
Namespace for UTF-8 constants and byte classification helpers.
Implementations§
Source§impl Utf8
impl Utf8
Sourcepub const MAX_UNITS_PER_CHAR: usize = 4
pub const MAX_UNITS_PER_CHAR: usize = 4
Maximum number of UTF-8 bytes needed for one Unicode scalar value.
Sourcepub const MAX_BYTES_PER_CHAR: usize = Self::MAX_UNITS_PER_CHAR
pub const MAX_BYTES_PER_CHAR: usize = Self::MAX_UNITS_PER_CHAR
Maximum number of UTF-8 bytes needed for one Unicode scalar value.
Sourcepub const fn is_single_byte(byte: u8) -> bool
pub const fn is_single_byte(byte: u8) -> bool
Sourcepub const fn is_leading_byte(byte: u8) -> bool
pub const fn is_leading_byte(byte: u8) -> bool
Sourcepub const fn is_continuation_byte(byte: u8) -> bool
pub const fn is_continuation_byte(byte: u8) -> bool
Sourcepub const fn byte_len_from_leading_byte(byte: u8) -> Option<usize>
pub const fn byte_len_from_leading_byte(byte: u8) -> Option<usize>
Auto Trait Implementations§
impl Freeze for Utf8
impl RefUnwindSafe for Utf8
impl Send for Utf8
impl Sync for Utf8
impl Unpin for Utf8
impl UnsafeUnpin for Utf8
impl UnwindSafe for Utf8
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