[−]Enum conv::errors::GeneralError
A general error enumeration that subsumes all other conversion errors.
This exists primarily as a "catch-all" for reliably unifying various different kinds of conversion errors.
Variants
NegOverflow(T)
Input was too negative for the target type.
PosOverflow(T)
Input was too positive for the target type.
Unrepresentable(T)
Input was not representable in the target type.
Methods
impl<T> GeneralError<T>
[src]
pub fn into_inner(self) -> T
[src]
Returns the value stored in this error.
Trait Implementations
impl<T: Eq> Eq for GeneralError<T>
impl<T: Clone> Clone for GeneralError<T>
fn clone(&self) -> GeneralError<T>
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<T: PartialOrd> PartialOrd<GeneralError<T>> for GeneralError<T>
fn partial_cmp(&self, other: &GeneralError<T>) -> Option<Ordering>
fn lt(&self, other: &GeneralError<T>) -> bool
fn le(&self, other: &GeneralError<T>) -> bool
fn gt(&self, other: &GeneralError<T>) -> bool
fn ge(&self, other: &GeneralError<T>) -> bool
impl<T: Ord> Ord for GeneralError<T>
fn cmp(&self, other: &GeneralError<T>) -> Ordering
fn max(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
1.21.0[src]
fn clamp(self, min: Self, max: Self) -> Self
[src]
impl<T: PartialEq> PartialEq<GeneralError<T>> for GeneralError<T>
fn eq(&self, other: &GeneralError<T>) -> bool
fn ne(&self, other: &GeneralError<T>) -> bool
impl<T> From<NoError> for GeneralError<T>
[src]
impl<T> From<Unrepresentable<T>> for GeneralError<T>
[src]
fn from(e: Unrepresentable<T>) -> Self
[src]
impl<T> From<NegOverflow<T>> for GeneralError<T>
[src]
fn from(e: NegOverflow<T>) -> Self
[src]
impl<T> From<PosOverflow<T>> for GeneralError<T>
[src]
fn from(e: PosOverflow<T>) -> Self
[src]
impl<T> From<RangeError<T>> for GeneralError<T>
[src]
fn from(e: RangeError<T>) -> Self
[src]
impl<T> From<FloatError<T>> for GeneralError<T>
[src]
fn from(e: FloatError<T>) -> GeneralError<T>
[src]
impl<T> From<GeneralError<T>> for GeneralErrorKind
[src]
fn from(e: GeneralError<T>) -> Self
[src]
impl<T: Copy> Copy for GeneralError<T>
impl<T> Display for GeneralError<T>
[src]
impl<T> Debug for GeneralError<T>
[src]
impl<T> Error for GeneralError<T> where
T: Any,
[src]
T: Any,
Auto Trait Implementations
impl<T> Sync for GeneralError<T> where
T: Sync,
T: Sync,
impl<T> Send for GeneralError<T> where
T: Send,
T: Send,
impl<T> Unpin for GeneralError<T> where
T: Unpin,
T: Unpin,
impl<T> UnwindSafe for GeneralError<T> where
T: UnwindSafe,
T: UnwindSafe,
impl<T> RefUnwindSafe for GeneralError<T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
Blanket Implementations
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Src where
Scheme: ApproxScheme,
[src]
Scheme: ApproxScheme,
type Err = NoError
The error type produced by a failed conversion.
fn approx_from(Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
[src]
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Src where
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
[src]
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
The error type produced by a failed conversion.
fn approx_into(Self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
[src]
impl<Src> TryFrom<Src> for Src
[src]
type Err = NoError
The error type produced by a failed conversion.
fn try_from(Src) -> Result<Src, <Src as TryFrom<Src>>::Err>
[src]
impl<Src, Dst> TryInto<Dst> for Src where
Dst: TryFrom<Src>,
[src]
Dst: TryFrom<Src>,
type Err = <Dst as TryFrom<Src>>::Err
The error type produced by a failed conversion.
fn try_into(Self) -> Result<Dst, <Src as TryInto<Dst>>::Err>
[src]
impl<Src> ValueFrom<Src> for Src
[src]
type Err = NoError
The error type produced by a failed conversion.
fn value_from(Src) -> Result<Src, <Src as ValueFrom<Src>>::Err>
[src]
impl<Src, Dst> ValueInto<Dst> for Src where
Dst: ValueFrom<Src>,
[src]
Dst: ValueFrom<Src>,
type Err = <Dst as ValueFrom<Src>>::Err
The error type produced by a failed conversion.
fn value_into(Self) -> Result<Dst, <Src as ValueInto<Dst>>::Err>
[src]
impl<T> ConvUtil for T
[src]
fn approx_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: Sized + ApproxInto<Dst>,
[src]
Self: Sized + ApproxInto<Dst>,
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err> where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
[src]
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
fn into_as<Dst>(self) -> Dst where
Self: Sized + Into<Dst>,
[src]
Self: Sized + Into<Dst>,
fn try_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: Sized + TryInto<Dst>,
[src]
Self: Sized + TryInto<Dst>,
fn value_as<Dst>(self) -> Result<Dst, Self::Err> where
Self: Sized + ValueInto<Dst>,
[src]
Self: Sized + ValueInto<Dst>,
impl<T, Dst> ConvAsUtil<Dst> for T
[src]
fn approx(self) -> Result<Dst, Self::Err> where
Self: Sized + ApproxInto<Dst>,
[src]
Self: Sized + ApproxInto<Dst>,
fn approx_by<Scheme>(self) -> Result<Dst, Self::Err> where
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
[src]
Self: Sized + ApproxInto<Dst, Scheme>,
Scheme: ApproxScheme,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,