Expand description
Core error types used by vouched generated code.
Most users should depend on the facade crate, vouched, which re-exports these types together with the derive macro.
This crate exists so generated code can refer to stable validation error types.
The important public pieces are:
TooShortErrorandTooLongErrorforlen(...)failures.InvalidCharErrorforchars(...)failures.OutOfRangeIntegerErrorandIntegerValuefor integerrange(...)andimpls(try_from(...))failures.OutOfRangeFloatErrorandFloatValuefor floatrange(...)failures.VouchedError, implemented by generated error enums.Error, an allocation-backed erased wrapper available withalloc.
Structs§
- Error
- Wrapper type for handling different Vouched error types uniformly.
- Float
Value - Lossless float value captured by generated float range errors.
- Integer
Value - Lossless integer value captured by generated integer range and conversion errors.
- Invalid
Char Error - Error returned when a string newtype contains a character rejected by
chars. - OutOf
Range Float Error - Error returned when a float newtype is outside its
rangebounds. - OutOf
Range Integer Error - Error returned when an integer newtype is outside its
rangebounds. - TooLong
Error - Error returned when a string newtype is longer than its
lenupper bound. - TooShort
Error - Error returned when a string newtype is shorter than its
lenlower bound.
Enums§
- Float
Range Violation - Reason a float range validation failed.
Traits§
- Vouched
Error - Common interface for generated Vouched errors.