pub enum FormatMask {
Number {
decimals: usize,
thousands_separator: bool,
allow_negative: bool,
prefix: Option<String>,
suffix: Option<String>,
},
Date {
format: DateFormat,
},
Time {
format: TimeFormat,
use_24_hour: bool,
},
Phone {
country: PhoneCountry,
},
SSN,
ZipCode {
plus_four: bool,
},
CreditCard,
Custom {
pattern: String,
placeholder: char,
},
}Expand description
Format masks for field input
Variants§
Number
Numeric format
Fields
Date
Date format
Fields
§
format: DateFormatTime
Time format
Phone
Phone number format
Fields
§
country: PhoneCountrySSN
Social Security Number
ZipCode
ZIP code (5 or 9 digits)
CreditCard
Credit card number
Custom
Custom mask pattern
Trait Implementations§
Source§impl Clone for FormatMask
impl Clone for FormatMask
Source§fn clone(&self) -> FormatMask
fn clone(&self) -> FormatMask
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for FormatMask
impl RefUnwindSafe for FormatMask
impl Send for FormatMask
impl Sync for FormatMask
impl Unpin for FormatMask
impl UnwindSafe for FormatMask
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