pub enum InvalidNumberErrorInternal {
InvalidNumber(InvalidNumberError),
InvalidRegex(InvalidRegexError),
}Expand description
Internal error type used during number validation.
Variants§
InvalidNumber(InvalidNumberError)
Wraps a public InvalidNumberError.
InvalidRegex(InvalidRegexError)
An error indicating a regex was invalid during validation, signaling a library bug.
Implementations§
Source§impl InvalidNumberErrorInternal
impl InvalidNumberErrorInternal
Sourcepub fn into_public(self) -> InvalidNumberError
pub fn into_public(self) -> InvalidNumberError
Converts an internal validation error into its public InvalidNumberError.
If the error is a RegexError, this method will panic, as it signifies a
critical library bug.
Trait Implementations§
Source§impl Debug for InvalidNumberErrorInternal
impl Debug for InvalidNumberErrorInternal
Source§impl Display for InvalidNumberErrorInternal
impl Display for InvalidNumberErrorInternal
Source§impl Error for InvalidNumberErrorInternal
impl Error for InvalidNumberErrorInternal
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<InvalidNumberError> for InvalidNumberErrorInternal
impl From<InvalidNumberError> for InvalidNumberErrorInternal
Source§fn from(source: InvalidNumberError) -> Self
fn from(source: InvalidNumberError) -> Self
Converts to this type from the input type.
Source§impl From<InvalidRegexError> for InvalidNumberErrorInternal
impl From<InvalidRegexError> for InvalidNumberErrorInternal
Source§fn from(source: InvalidRegexError) -> Self
fn from(source: InvalidRegexError) -> Self
Converts to this type from the input type.
Source§impl From<ParseErrorInternal> for InvalidNumberErrorInternal
impl From<ParseErrorInternal> for InvalidNumberErrorInternal
Source§fn from(value: ParseErrorInternal) -> Self
fn from(value: ParseErrorInternal) -> Self
Converts an internal parsing error into an internal “invalid number” error.
impl StructuralPartialEq for InvalidNumberErrorInternal
Auto Trait Implementations§
impl Freeze for InvalidNumberErrorInternal
impl RefUnwindSafe for InvalidNumberErrorInternal
impl Send for InvalidNumberErrorInternal
impl Sync for InvalidNumberErrorInternal
impl Unpin for InvalidNumberErrorInternal
impl UnwindSafe for InvalidNumberErrorInternal
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