pub enum ExtractNumberError {
NoValidStartCharacter,
NotANumber,
}Expand description
Represents errors during the low-level extraction of a number string.
Variants§
NoValidStartCharacter
The input string does not contain a character that could begin a phone number
(e.g., a digit, +, or #).
NotANumber
Number did not match valid number pattern.
Trait Implementations§
Source§impl Debug for ExtractNumberError
impl Debug for ExtractNumberError
Source§impl Display for ExtractNumberError
impl Display for ExtractNumberError
Source§impl Error for ExtractNumberError
impl Error for ExtractNumberError
1.30.0 · 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<ExtractNumberError> for ParseError
impl From<ExtractNumberError> for ParseError
Source§fn from(value: ExtractNumberError) -> Self
fn from(value: ExtractNumberError) -> Self
Converts a low-level ExtractNumberError into a public-facing ParseError.
This simplifies the error API by nesting specific errors within more general ones.
Source§impl PartialEq for ExtractNumberError
impl PartialEq for ExtractNumberError
impl StructuralPartialEq for ExtractNumberError
Auto Trait Implementations§
impl Freeze for ExtractNumberError
impl RefUnwindSafe for ExtractNumberError
impl Send for ExtractNumberError
impl Sync for ExtractNumberError
impl Unpin for ExtractNumberError
impl UnwindSafe for ExtractNumberError
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