pub enum TextUnit {
Characters,
CharactersExcludingSpaces,
Words,
Lines,
}Expand description
The units a Range selector counts.
Variants§
Characters
Grapheme clusters, spaces included.
CharactersExcludingSpaces
Grapheme clusters that are not white space.
Words
UAX #29 words that hold a letter or digit; a CJK ideograph is a word.
Lines
Laid-out lines.
Trait Implementations§
impl Copy for TextUnit
Source§impl<'de> Deserialize<'de> for TextUnit
impl<'de> Deserialize<'de> for TextUnit
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for TextUnit
impl StructuralPartialEq for TextUnit
Auto Trait Implementations§
impl Freeze for TextUnit
impl RefUnwindSafe for TextUnit
impl Send for TextUnit
impl Sync for TextUnit
impl Unpin for TextUnit
impl UnsafeUnpin for TextUnit
impl UnwindSafe for TextUnit
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