pub enum RangeError<T> {
NegOverflow(T),
PosOverflow(T),
}
Expand description
Indicates that a conversion failed due to a range error.
Variants§
NegOverflow(T)
Input was too negative for the target type.
PosOverflow(T)
Input was too positive the target type.
Implementations§
Source§impl<T> RangeError<T>
impl<T> RangeError<T>
Sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Returns the value stored in this error.
Trait Implementations§
Source§impl<T: Clone> Clone for RangeError<T>
impl<T: Clone> Clone for RangeError<T>
Source§fn clone(&self) -> RangeError<T>
fn clone(&self) -> RangeError<T>
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<T> Debug for RangeError<T>
impl<T> Debug for RangeError<T>
Source§impl<T> Display for RangeError<T>
impl<T> Display for RangeError<T>
Source§impl<T> Error for RangeError<T>where
T: Any,
impl<T> Error for RangeError<T>where
T: Any,
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 RangeError<T>
impl<T> From<NegOverflow<T>> for RangeError<T>
Source§fn from(e: NegOverflow<T>) -> Self
fn from(e: NegOverflow<T>) -> Self
Converts to this type from the input type.
Source§impl<T> From<NoError> for RangeError<T>
impl<T> From<NoError> for RangeError<T>
Source§impl<T> From<PosOverflow<T>> for RangeError<T>
impl<T> From<PosOverflow<T>> for RangeError<T>
Source§fn from(e: PosOverflow<T>) -> Self
fn from(e: PosOverflow<T>) -> Self
Converts to this type from the input type.
Source§impl<T> From<RangeError<T>> for FloatError<T>
impl<T> From<RangeError<T>> for FloatError<T>
Source§fn from(e: RangeError<T>) -> Self
fn from(e: RangeError<T>) -> Self
Converts to this type from the input type.
Source§impl<T> From<RangeError<T>> for GeneralError<T>
impl<T> From<RangeError<T>> for GeneralError<T>
Source§fn from(e: RangeError<T>) -> Self
fn from(e: RangeError<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<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<T: Ord> Ord for RangeError<T>
impl<T: Ord> Ord for RangeError<T>
Source§fn cmp(&self, other: &RangeError<T>) -> Ordering
fn cmp(&self, other: &RangeError<T>) -> 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<T: PartialEq> PartialEq for RangeError<T>
impl<T: PartialEq> PartialEq for RangeError<T>
Source§impl<T: PartialOrd> PartialOrd for RangeError<T>
impl<T: PartialOrd> PartialOrd for RangeError<T>
impl<T: Copy> Copy for RangeError<T>
impl<T: Eq> Eq for RangeError<T>
impl<T> StructuralPartialEq for RangeError<T>
Auto Trait Implementations§
impl<T> Freeze for RangeError<T>where
T: Freeze,
impl<T> RefUnwindSafe for RangeError<T>where
T: RefUnwindSafe,
impl<T> Send for RangeError<T>where
T: Send,
impl<T> Sync for RangeError<T>where
T: Sync,
impl<T> Unpin for RangeError<T>where
T: Unpin,
impl<T> UnwindSafe for RangeError<T>where
T: UnwindSafe,
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.