Skip to main content

Crate vouched_core

Crate vouched_core 

Source
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:

Structs§

Error
Wrapper type for handling different Vouched error types uniformly.
FloatValue
Lossless float value captured by generated float range errors.
IntegerValue
Lossless integer value captured by generated integer range and conversion errors.
InvalidCharError
Error returned when a string newtype contains a character rejected by chars.
OutOfRangeFloatError
Error returned when a float newtype is outside its range bounds.
OutOfRangeIntegerError
Error returned when an integer newtype is outside its range bounds.
TooLongError
Error returned when a string newtype is longer than its len upper bound.
TooShortError
Error returned when a string newtype is shorter than its len lower bound.

Enums§

FloatRangeViolation
Reason a float range validation failed.

Traits§

VouchedError
Common interface for generated Vouched errors.