pub enum RangeErrorKind {
NegOverflow,
PosOverflow,
}
Expand description
Indicates that a conversion failed due to a range error.
This is a variant of RangeError
that does not retain the input value which caused the error. It exists to help unify some utility methods and should not generally be used directly, unless you are targeting the Unwrap*
traits.
Variants§
NegOverflow
Input was too negative for the target type.
PosOverflow
Input was too positive for the target type.
Trait Implementations§
Source§impl Clone for RangeErrorKind
impl Clone for RangeErrorKind
Source§fn clone(&self) -> RangeErrorKind
fn clone(&self) -> RangeErrorKind
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 RangeErrorKind
impl Debug for RangeErrorKind
Source§impl Display for RangeErrorKind
impl Display for RangeErrorKind
Source§impl Error for RangeErrorKind
impl Error for RangeErrorKind
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<NegOverflow<T>> for RangeErrorKind
impl<T> From<NegOverflow<T>> for RangeErrorKind
Source§fn from(_: NegOverflow<T>) -> Self
fn from(_: NegOverflow<T>) -> Self
Converts to this type from the input type.
Source§impl From<NoError> for RangeErrorKind
impl From<NoError> for RangeErrorKind
Source§impl<T> From<PosOverflow<T>> for RangeErrorKind
impl<T> From<PosOverflow<T>> for RangeErrorKind
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 RangeErrorKind
impl<T> From<RangeError<T>> for RangeErrorKind
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 Ord for RangeErrorKind
impl Ord for RangeErrorKind
Source§fn cmp(&self, other: &RangeErrorKind) -> Ordering
fn cmp(&self, other: &RangeErrorKind) -> 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 RangeErrorKind
impl PartialEq for RangeErrorKind
Source§impl PartialOrd for RangeErrorKind
impl PartialOrd for RangeErrorKind
impl Copy for RangeErrorKind
impl Eq for RangeErrorKind
impl StructuralPartialEq for RangeErrorKind
Auto Trait Implementations§
impl Freeze for RangeErrorKind
impl RefUnwindSafe for RangeErrorKind
impl Send for RangeErrorKind
impl Sync for RangeErrorKind
impl Unpin for RangeErrorKind
impl UnwindSafe for RangeErrorKind
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.