pub struct TryFromIntError(/* private fields */);Expand description
Returned when an integer conversion in this crate does not fit.
One type covers every direction – U256 or I256 down to a narrower
primitive, and between the two 256-bit types – and every reason, whether
the value is out of the target’s range or, converting to an unsigned type,
negative. That is what core::num::TryFromIntError does:
u8::try_from(300u32) and u8::try_from(-1i32) both yield it, with no
split by the source’s signedness and no payload to inspect. Splitting it
here would add a type without adding information.
It is a distinct type from core::num::TryFromIntError only because that
one cannot be constructed outside core.
Trait Implementations§
Source§impl Clone for TryFromIntError
impl Clone for TryFromIntError
Source§fn clone(&self) -> TryFromIntError
fn clone(&self) -> TryFromIntError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TryFromIntError
Source§impl Debug for TryFromIntError
impl Debug for TryFromIntError
Source§impl Display for TryFromIntError
Available on crate feature fmt only.Gated on fmt like every other Display in this crate: the message is a
string literal, and a guest build that never formats the error should not
carry it. std implies fmt, so the Error impl below always has its
Display bound.
impl Display for TryFromIntError
fmt only.Gated on fmt like every other Display in this crate: the message is a
string literal, and a guest build that never formats the error should not
carry it. std implies fmt, so the Error impl below always has its
Display bound.
impl Eq for TryFromIntError
Source§impl Error for TryFromIntError
Available on crate feature std only.
impl Error for TryFromIntError
std only.1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()