pub enum CountMode {
Characters,
DisplayWidth,
Bytes,
}Expand description
How to count characters for limit checking
Variants§
Characters
Count actual characters (default)
DisplayWidth
Count display width (useful for CJK characters)
Bytes
Count bytes (rarely used, but available)
Trait Implementations§
impl Copy for CountMode
Source§impl<'de> Deserialize<'de> for CountMode
impl<'de> Deserialize<'de> for CountMode
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
Auto Trait Implementations§
impl Freeze for CountMode
impl RefUnwindSafe for CountMode
impl Send for CountMode
impl Sync for CountMode
impl Unpin for CountMode
impl UnsafeUnpin for CountMode
impl UnwindSafe for CountMode
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