#[non_exhaustive]
pub enum Error {
BelowLowerBound(i32, i32),
AboveUpperBound(i32, i32),
Negative,
Unrepresentable,
Overflow,
Uninhabited,
}Expand description
Conversion errors from converting a value into a BoundedInt32.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BelowLowerBound(i32, i32)
A passed value was below the lower bound for the type.
AboveUpperBound(i32, i32)
A passed value was above the upper bound for the type.
Negative
Tried to convert a negative value to an unsigned type.
Unrepresentable
Tried to parse a value that was not representable as the underlying type.
Overflow
We encountered some kind of integer overflow when converting a number.
Uninhabited
Tried to instantiate an uninhabited type.
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()