#[non_exhaustive]pub enum TextLengthUnit {
Characters,
Utf16CodeUnits,
}Expand description
The unit an engine’s text length counts in.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Characters
One per character, whatever its code point: Zoë is three and an
emoji is one.
Utf16CodeUnits
One per UTF-16 code unit: a character outside the basic plane, such as an emoji, is two.
Trait Implementations§
Source§impl Clone for TextLengthUnit
impl Clone for TextLengthUnit
impl Copy for TextLengthUnit
Source§impl Debug for TextLengthUnit
impl Debug for TextLengthUnit
Source§impl Default for TextLengthUnit
impl Default for TextLengthUnit
impl Eq for TextLengthUnit
Source§impl Hash for TextLengthUnit
impl Hash for TextLengthUnit
Source§impl PartialEq for TextLengthUnit
impl PartialEq for TextLengthUnit
impl StructuralPartialEq for TextLengthUnit
Auto Trait Implementations§
impl Forget for TextLengthUnit
impl Freeze for TextLengthUnit
impl Move for TextLengthUnit
impl RefUnwindSafe for TextLengthUnit
impl Send for TextLengthUnit
impl Sync for TextLengthUnit
impl Unpin for TextLengthUnit
impl UnsafeUnpin for TextLengthUnit
impl UnwindSafe for TextLengthUnit
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