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.
InvalidCharError
Error returned when a string newtype contains a character rejected by chars.
NumericValue
Lossless numeric value captured by generated range and cast errors.
OutOfRangeNumericError
Error returned when a numeric 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.

Traits§

VouchedError
Common interface for generated Vouched errors.