Struct rat_widget::masked_input::core::MaskToken
source · #[non_exhaustive]pub struct MaskToken {
pub nr_id: usize,
pub nr_start: usize,
pub nr_end: usize,
pub sec_id: usize,
pub sec_start: usize,
pub sec_end: usize,
pub peek_left: Mask,
pub right: Mask,
pub edit: Box<str>,
pub display: Box<str>,
}Expand description
One token of the input mask.
Which field of the mask does this belong to:
- Number with integer part, decimal separator, fraction and sign.
- Consecutive mask parts of similar type.
At this cursor position, what is the main mask (right) and what is possible left of the cursor position (peek_left).
Default-values for editing and display.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.nr_id: usize§nr_start: usize§nr_end: usize§sec_id: usize§sec_start: usize§sec_end: usize§peek_left: Mask§right: Mask§edit: Box<str>§display: Box<str>Trait Implementations§
source§impl PartialEq for MaskToken
impl PartialEq for MaskToken
impl Eq for MaskToken
impl StructuralPartialEq for MaskToken
Auto Trait Implementations§
impl Freeze for MaskToken
impl RefUnwindSafe for MaskToken
impl Send for MaskToken
impl Sync for MaskToken
impl Unpin for MaskToken
impl UnwindSafe for MaskToken
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more