pub struct UnicodeChar {
pub ch: char,
pub code_point: u32,
pub utf8_width: usize,
pub utf16_width: usize,
pub is_ascii: bool,
pub is_combining: bool,
pub is_surrogate: bool,
}Expand description
A Unicode scalar value bundled with precomputed metadata.
Fields§
§ch: charThe underlying Rust character.
code_point: u32Unicode code point.
utf8_width: usizeUTF-8 encoded length (1-4 bytes).
utf16_width: usizeUTF-16 code unit count (1 or 2).
is_ascii: boolTrue when ASCII.
is_combining: boolTrue when a combining character (heuristic).
is_surrogate: boolTrue when in surrogate range (never valid in Rust char).
Implementations§
Source§impl UnicodeChar
impl UnicodeChar
Trait Implementations§
Source§impl Clone for UnicodeChar
impl Clone for UnicodeChar
Source§fn clone(&self) -> UnicodeChar
fn clone(&self) -> UnicodeChar
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnicodeChar
impl Debug for UnicodeChar
Source§impl PartialEq for UnicodeChar
impl PartialEq for UnicodeChar
impl Eq for UnicodeChar
impl StructuralPartialEq for UnicodeChar
Auto Trait Implementations§
impl Freeze for UnicodeChar
impl RefUnwindSafe for UnicodeChar
impl Send for UnicodeChar
impl Sync for UnicodeChar
impl Unpin for UnicodeChar
impl UnsafeUnpin for UnicodeChar
impl UnwindSafe for UnicodeChar
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