pub enum PostalCodeConstructionError {
UnsupportedCountry {
attempted_country: Country,
},
InvalidFormat {
attempted_code: String,
attempted_country: Option<Country>,
},
RegexInitializationError {
country: Country,
},
}Expand description
Error type for postal code operations.
Variants§
UnsupportedCountry
The provided country is not supported by this library.
InvalidFormat
The provided postal code format is invalid for the specified country.
Fields
RegexInitializationError
Internal error: regex initialization failed.
Trait Implementations§
Source§impl Clone for PostalCodeConstructionError
impl Clone for PostalCodeConstructionError
Source§fn clone(&self) -> PostalCodeConstructionError
fn clone(&self) -> PostalCodeConstructionError
Returns a copy 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 moreSource§impl Debug for PostalCodeConstructionError
impl Debug for PostalCodeConstructionError
Source§impl<'de> Deserialize<'de> for PostalCodeConstructionError
impl<'de> Deserialize<'de> for PostalCodeConstructionError
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
Source§impl From<UninitializedFieldError> for PostalCodeConstructionError
impl From<UninitializedFieldError> for PostalCodeConstructionError
Source§fn from(_e: UninitializedFieldError) -> Self
fn from(_e: UninitializedFieldError) -> Self
Converts to this type from the input type.
impl Eq for PostalCodeConstructionError
impl StructuralPartialEq for PostalCodeConstructionError
Auto Trait Implementations§
impl Freeze for PostalCodeConstructionError
impl RefUnwindSafe for PostalCodeConstructionError
impl Send for PostalCodeConstructionError
impl Sync for PostalCodeConstructionError
impl Unpin for PostalCodeConstructionError
impl UnwindSafe for PostalCodeConstructionError
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