Expand description
Constraints defined by this crate
For each constraint the possible error codes are defined as a set of constants. The name of the constants follow the naming convention:
INVALID_<constraint-name>[_<variant>]
The -
) instead of the underscore to separate
terms. Thus the codes are compatible with the convention used in the
fluent project.
Structs§
- Assert
False - The value must be false.
- Assert
True - The value must be true.
- Contains
- The value must contain the specified member or the specified member must be part of the value.
- Digits
- Maximum number of allowed integer digits and fraction digits.
- Must
Match - Two related fields must be equal.
- NonZero
- Values of zero are not allowed.
- NotEmpty
- The value must not be empty.
- Pattern
- The value must match some regular expression.
Enums§
- Bound
- The value must be within some bounds.
- Char
Count - The number of characters must be within some bounds.
- Length
- The length of a value must be within some bounds.
- Must
Define Range - Two related fields must define a range.
Constants§
- INVALID_
ASSERT_ FALSE - Error code: the value does not assert to false (
AssertFalse
constraint) - INVALID_
ASSERT_ TRUE - Error code: the value does not assert to true (
AssertTrue
constraint) - INVALID_
BOUND_ CLOSED_ MAX - Error code: the value is not less than or equal to the specified maximum
(
Bound::ClosedRange
orBound::OpenClosedRange
constraint) - INVALID_
BOUND_ CLOSED_ MIN - Error code: the value is not greater than or equal to the specified minimum
(
Bound::ClosedRange
orBound::ClosedOpenRange
constraint) - INVALID_
BOUND_ EXACT - Error code: the value is not exactly the specified value
(
Bound::Exact
constraint) - INVALID_
BOUND_ OPEN_ MAX - Error code: the value is not less than the specified maximum
(
Bound::OpenRange
orBound::ClosedOpenRange
constraint) - INVALID_
BOUND_ OPEN_ MIN - Error code: the value is not greater than the specified minimum
(
Bound::OpenRange
orBound::OpenClosedRange
constraint) - INVALID_
CHAR_ COUNT_ EXACT - Error code: the number of characters is not exactly the specified value
(
CharCount::Exact
constraint) - INVALID_
CHAR_ COUNT_ MAX - Error code: the number of characters is not less or equal the specified
maximum (
CharCount::Max
constraint) - INVALID_
CHAR_ COUNT_ MIN - Error code: the number of characters is not greater or equal the specified
minimum (
CharCount::Min
constraint) - INVALID_
CONTAINS_ ELEMENT - Error code: the value does not contain the specified member element
(
Contains
constraint) - INVALID_
DIGITS_ FRACTION - Error code: the number of fraction digits is not less than or equal to the
specified maximum (
Digits::fraction
constraint) - INVALID_
DIGITS_ INTEGER - Error code: the number of integer digits is not less than or equal to the
specified maximum (
Digits::integer
constraint) - INVALID_
LENGTH_ EXACT - Error code: the length is not the exactly the specified value
(
Length::Exact
constraint) - INVALID_
LENGTH_ MAX - Error code: the length is not less or equal the specified maximum
(
Length::Max
constraint) - INVALID_
LENGTH_ MIN - Error code: the length is not greater or equal the specified minimum
(
Length::Min
constraint) - INVALID_
MUST_ DEFINE_ RANGE_ EXCLUSIVE - Error code: the first value is not less than the second value
(
MustDefineRange::Exclusive
constraint) - INVALID_
MUST_ DEFINE_ RANGE_ INCLUSIVE - Error code: the first value is not less than or equal to the second value
(
MustDefineRange::Inclusive
constraint) - INVALID_
MUST_ MATCH - Error code: the two values do not match (
MustMatch
constraint) - INVALID_
NON_ ZERO - Error code: the value is zero (
NonZero
constraint) - INVALID_
NOT_ EMPTY - Error code: the value is empty (
NotEmpty
constraint) - INVALID_
PATTERN - Error code: the value does not match the specified pattern
(
Pattern
constraint)