pub enum GetExampleNumberError {
FailedToParse(ParseError),
NoExampleNumber,
CouldNotGetNumber,
InvalidRegionCode,
}Expand description
Represents possible failures when requesting an example phone number.
Variants§
FailedToParse(ParseError)
An internal parsing error occurred while constructing the example number.
NoExampleNumber
No example number is available for the requested region or number type in the metadata.
CouldNotGetNumber
A generic failure occurred while trying to retrieve the number.
InvalidRegionCode
The provided region code is invalid or not supported by the library.
Trait Implementations§
Source§impl Debug for GetExampleNumberError
impl Debug for GetExampleNumberError
Source§impl Display for GetExampleNumberError
impl Display for GetExampleNumberError
Source§impl Error for GetExampleNumberError
impl Error for GetExampleNumberError
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<GetExampleNumberError> for GetExampleNumberErrorInternal
impl From<GetExampleNumberError> for GetExampleNumberErrorInternal
Source§fn from(source: GetExampleNumberError) -> Self
fn from(source: GetExampleNumberError) -> Self
Converts to this type from the input type.
Source§impl From<ParseError> for GetExampleNumberError
impl From<ParseError> for GetExampleNumberError
Source§fn from(source: ParseError) -> Self
fn from(source: ParseError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for GetExampleNumberError
impl PartialEq for GetExampleNumberError
impl StructuralPartialEq for GetExampleNumberError
Auto Trait Implementations§
impl Freeze for GetExampleNumberError
impl RefUnwindSafe for GetExampleNumberError
impl Send for GetExampleNumberError
impl Sync for GetExampleNumberError
impl Unpin for GetExampleNumberError
impl UnwindSafe for GetExampleNumberError
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