pub enum MaxLengthEnforcement {
None,
Enforced,
TruncateAfterCompositionEnds,
}Expand description
Mechanisms for enforcing maximum length limits.
This is used by TextField to specify how the TextField.maxLength should
be applied.
Variants§
None
No enforcement applied to the editing value. It’s possible to exceed the max length.
Enforced
Keep the length of the text input from exceeding the max length even when the text has an unfinished composing region.
TruncateAfterCompositionEnds
Users can still input text if the current value is composing even after reaching the max length limit. After composing ends, the value will be truncated.
Trait Implementations§
Source§impl Clone for MaxLengthEnforcement
impl Clone for MaxLengthEnforcement
impl Copy for MaxLengthEnforcement
Source§impl Debug for MaxLengthEnforcement
impl Debug for MaxLengthEnforcement
impl Eq for MaxLengthEnforcement
Source§impl Hash for MaxLengthEnforcement
impl Hash for MaxLengthEnforcement
Source§impl PartialEq for MaxLengthEnforcement
impl PartialEq for MaxLengthEnforcement
impl StructuralPartialEq for MaxLengthEnforcement
Auto Trait Implementations§
impl Freeze for MaxLengthEnforcement
impl RefUnwindSafe for MaxLengthEnforcement
impl Send for MaxLengthEnforcement
impl Sync for MaxLengthEnforcement
impl Unpin for MaxLengthEnforcement
impl UnsafeUnpin for MaxLengthEnforcement
impl UnwindSafe for MaxLengthEnforcement
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.