pub enum NotANumberError {
NotMatchedValidNumberPattern,
InvalidPhoneContext,
FailedToParseNumberAsInt(ParseIntError),
FailedToExtractNumber(ExtractNumberError),
}Expand description
Provides more specific details for a ParseError::NotANumber failure.
Variants§
NotMatchedValidNumberPattern
The number string does not match the basic regular expression for a valid phone number pattern.
InvalidPhoneContext
The phone number context is invalid, such as an incorrect “tel:” prefix.
FailedToParseNumberAsInt(ParseIntError)
A numeric portion of the phone number string could not be parsed into an integer.
FailedToExtractNumber(ExtractNumberError)
An error occurred at the lowest level of extracting a numeric string from the input.
Trait Implementations§
Source§impl Debug for NotANumberError
impl Debug for NotANumberError
Source§impl Display for NotANumberError
impl Display for NotANumberError
Source§impl Error for NotANumberError
impl Error for NotANumberError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ExtractNumberError> for NotANumberError
impl From<ExtractNumberError> for NotANumberError
Source§fn from(source: ExtractNumberError) -> Self
fn from(source: ExtractNumberError) -> Self
Converts to this type from the input type.
Source§impl From<NotANumberError> for ParseError
impl From<NotANumberError> for ParseError
Source§fn from(source: NotANumberError) -> Self
fn from(source: NotANumberError) -> Self
Converts to this type from the input type.
Source§impl From<ParseIntError> for NotANumberError
impl From<ParseIntError> for NotANumberError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for NotANumberError
impl PartialEq for NotANumberError
impl StructuralPartialEq for NotANumberError
Auto Trait Implementations§
impl Freeze for NotANumberError
impl RefUnwindSafe for NotANumberError
impl Send for NotANumberError
impl Sync for NotANumberError
impl Unpin for NotANumberError
impl UnwindSafe for NotANumberError
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