pub enum GeneralErrorKind {
NegOverflow,
PosOverflow,
Unrepresentable,
}
Expand description
A general error enumeration that subsumes all other conversion errors, but discards all input payloads the errors may be carrying.
This exists primarily as a “catch-all” for reliably unifying various different kinds of conversion errors, and between different input types.
Variants§
NegOverflow
Input was too negative for the target type.
PosOverflow
Input was too positive for the target type.
Unrepresentable
Input was not representable in the target type.
Trait Implementations§
Source§impl Clone for GeneralErrorKind
impl Clone for GeneralErrorKind
Source§fn clone(&self) -> GeneralErrorKind
fn clone(&self) -> GeneralErrorKind
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 GeneralErrorKind
impl Debug for GeneralErrorKind
Source§impl Display for GeneralErrorKind
impl Display for GeneralErrorKind
Source§impl Error for GeneralErrorKind
impl Error for GeneralErrorKind
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
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
Source§impl<T> From<FloatError<T>> for GeneralErrorKind
impl<T> From<FloatError<T>> for GeneralErrorKind
Source§fn from(e: FloatError<T>) -> GeneralErrorKind
fn from(e: FloatError<T>) -> GeneralErrorKind
Converts to this type from the input type.
Source§impl<T> From<GeneralError<T>> for GeneralErrorKind
impl<T> From<GeneralError<T>> for GeneralErrorKind
Source§fn from(e: GeneralError<T>) -> Self
fn from(e: GeneralError<T>) -> Self
Converts to this type from the input type.
Source§impl<T> From<NegOverflow<T>> for GeneralErrorKind
impl<T> From<NegOverflow<T>> for GeneralErrorKind
Source§fn from(_: NegOverflow<T>) -> Self
fn from(_: NegOverflow<T>) -> Self
Converts to this type from the input type.
Source§impl From<NoError> for GeneralErrorKind
impl From<NoError> for GeneralErrorKind
Source§impl<T> From<PosOverflow<T>> for GeneralErrorKind
impl<T> From<PosOverflow<T>> for GeneralErrorKind
Source§fn from(_: PosOverflow<T>) -> Self
fn from(_: PosOverflow<T>) -> Self
Converts to this type from the input type.
Source§impl<T> From<RangeError<T>> for GeneralErrorKind
impl<T> From<RangeError<T>> for GeneralErrorKind
Source§fn from(e: RangeError<T>) -> Self
fn from(e: RangeError<T>) -> Self
Converts to this type from the input type.
Source§impl From<RangeErrorKind> for GeneralErrorKind
impl From<RangeErrorKind> for GeneralErrorKind
Source§fn from(e: RangeErrorKind) -> Self
fn from(e: RangeErrorKind) -> Self
Converts to this type from the input type.
Source§impl<T> From<Unrepresentable<T>> for GeneralErrorKind
impl<T> From<Unrepresentable<T>> for GeneralErrorKind
Source§fn from(_: Unrepresentable<T>) -> Self
fn from(_: Unrepresentable<T>) -> Self
Converts to this type from the input type.
Source§impl Ord for GeneralErrorKind
impl Ord for GeneralErrorKind
Source§fn cmp(&self, other: &GeneralErrorKind) -> Ordering
fn cmp(&self, other: &GeneralErrorKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for GeneralErrorKind
impl PartialEq for GeneralErrorKind
Source§impl PartialOrd for GeneralErrorKind
impl PartialOrd for GeneralErrorKind
impl Copy for GeneralErrorKind
impl Eq for GeneralErrorKind
impl StructuralPartialEq for GeneralErrorKind
Auto Trait Implementations§
impl Freeze for GeneralErrorKind
impl RefUnwindSafe for GeneralErrorKind
impl Send for GeneralErrorKind
impl Sync for GeneralErrorKind
impl Unpin for GeneralErrorKind
impl UnwindSafe for GeneralErrorKind
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Convert the given value into an approximately equivalent representation.
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
Convert the subject into an approximately equivalent representation.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Approximate the subject to a given type with the default scheme.
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
Approximate the subject to a given type with a specific scheme.