pub enum Utf16 {}Expand description
Namespace for UTF-16 constants and code-unit classification helpers.
Implementations§
Source§impl Utf16
impl Utf16
Sourcepub const MAX_UNITS_PER_CHAR: usize = 2
pub const MAX_UNITS_PER_CHAR: usize = 2
Maximum number of UTF-16 code units needed for one Unicode scalar value.
Sourcepub const MAX_BYTES_PER_CHAR: usize = 4
pub const MAX_BYTES_PER_CHAR: usize = 4
Maximum number of serialized UTF-16 bytes needed for one Unicode scalar value.
Sourcepub const fn is_high_surrogate(unit: u16) -> bool
pub const fn is_high_surrogate(unit: u16) -> bool
Sourcepub const fn is_low_surrogate(unit: u16) -> bool
pub const fn is_low_surrogate(unit: u16) -> bool
Sourcepub const fn is_surrogate(unit: u16) -> bool
pub const fn is_surrogate(unit: u16) -> bool
Sourcepub const fn is_single_unit(unit: u16) -> bool
pub const fn is_single_unit(unit: u16) -> bool
Sourcepub const fn is_surrogate_pair(high: u16, low: u16) -> bool
pub const fn is_surrogate_pair(high: u16, low: u16) -> bool
Sourcepub const fn unit_len_code_point(code_point: u32) -> Option<usize>
pub const fn unit_len_code_point(code_point: u32) -> Option<usize>
Sourcepub const fn high_surrogate(code_point: u32) -> Option<u16>
pub const fn high_surrogate(code_point: u32) -> Option<u16>
Sourcepub const fn low_surrogate(code_point: u32) -> Option<u16>
pub const fn low_surrogate(code_point: u32) -> Option<u16>
Auto Trait Implementations§
impl Freeze for Utf16
impl RefUnwindSafe for Utf16
impl Send for Utf16
impl Sync for Utf16
impl Unpin for Utf16
impl UnsafeUnpin for Utf16
impl UnwindSafe for Utf16
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