#[non_exhaustive]pub enum UnexpectedField {
String(EditableFieldString),
ConcealedString(EditableFieldConcealedString),
Boolean(EditableFieldBoolean),
Date(EditableFieldDate),
YearMonth(EditableFieldYearMonth),
SubdivisionCode(EditableFieldSubdivisionCode),
CountryCode(EditableFieldCountryCode),
WifiNetworkSecurityType(EditableFieldWifiNetworkSecurityType),
Email(EditableFieldEmail),
Number(EditableFieldNumber),
Unknown {
field_type: FieldType,
value: String,
},
}Expand description
A field of the incorrect type that was passed instead of an expected field type.
For example if the spec requires a string type, but the user passes in
concealed-string instead.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
String(EditableFieldString)
ConcealedString(EditableFieldConcealedString)
Boolean(EditableFieldBoolean)
Date(EditableFieldDate)
YearMonth(EditableFieldYearMonth)
SubdivisionCode(EditableFieldSubdivisionCode)
CountryCode(EditableFieldCountryCode)
WifiNetworkSecurityType(EditableFieldWifiNetworkSecurityType)
Email(EditableFieldEmail)
Number(EditableFieldNumber)
Unknown
Implementations§
Source§impl UnexpectedField
impl UnexpectedField
Sourcepub fn field_type(&self) -> FieldType
pub fn field_type(&self) -> FieldType
Returns the FieldType for this value.
Trait Implementations§
Source§impl Clone for UnexpectedField
impl Clone for UnexpectedField
Source§fn clone(&self) -> UnexpectedField
fn clone(&self) -> UnexpectedField
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for UnexpectedField
impl Debug for UnexpectedField
impl Eq for UnexpectedField
Source§impl From<UnexpectedField> for String
impl From<UnexpectedField> for String
Source§fn from(value: UnexpectedField) -> Self
fn from(value: UnexpectedField) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UnexpectedField
impl PartialEq for UnexpectedField
Source§fn eq(&self, other: &UnexpectedField) -> bool
fn eq(&self, other: &UnexpectedField) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for UnexpectedField
Auto Trait Implementations§
impl Freeze for UnexpectedField
impl RefUnwindSafe for UnexpectedField
impl Send for UnexpectedField
impl Sync for UnexpectedField
impl Unpin for UnexpectedField
impl UnsafeUnpin for UnexpectedField
impl UnwindSafe for UnexpectedField
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