Expand description
This module defines the various error types that can be produced by a failed conversion.
In addition, it also defines some extension traits to make working with failable conversions more ergonomic (see the Unwrap*
traits).
Structs§
- Indicates that the conversion failed due to a negative overflow.
- Indicates that the conversion failed due to a positive overflow.
- Indicates that the conversion failed because the value was not representable.
Enums§
- Indicates that a conversion from a floating point type failed.
- A general error enumeration that subsumes all other conversion errors.
- A general error enumeration that subsumes all other conversion errors, but discards all input payloads the errors may be carrying.
- Indicates that it is not possible for the conversion to fail.
- Indicates that a conversion failed due to a range error.
- Indicates that a conversion failed due to a range error.
Traits§
- Saturates a
Result
. - Safely unwrap a
Result
that cannot contain an error. - Unwrap a conversion by saturating to infinity.
- Unwrap a conversion by replacing a failure with an invalid sentinel value.
- Unwrap a conversion by saturating.