Expand description
Constrained newtypes that validate on construction and on deserialize.
Structs§
- Bounded
Float - Finite
f64constrained byB. - Bounded
I64 - Signed 64-bit integer whose value is in
MIN..=MAX. - Constrained
String - UTF-8 string whose character length is in
MIN..=MAX. - Constrained
Vec - A
Vec<T>whose length is inMIN..=MAX. - Decimal
- Decimal number with at most
MAX_DIGITSsignificant digits and at mostDECIMAL_PLACESdigits after the decimal point. - Email address validated by the pragmatic
rules::emailcheck. - HttpUrl
- An absolute
httporhttpsURL. - IpAddress
- An IPv4 or IPv6 address.
- Ipv4
Address - An IPv4 address.
- Ipv6
Address - An IPv6 address.
- Negative
Int - Strictly negative
i64(value < 0). - NonNegative
- Non-negative floats (
>= 0.0). - NonNegative
Int - Non-negative
i64(value >= 0). - Positive
- Strictly positive floats (
> 0.0). - Positive
Int - Strictly positive
i64(value > 0). - Secret
String - Opaque string that redacts its contents in
Debug,Display, andSerialize. - Unit
Interval - Closed unit interval
0.0..=1.0. - Url
- An absolute URL of any scheme.
- Uuid
- An RFC 4122 UUID of any version.
Traits§
- Float
Bounds - Inclusive/exclusive bounds for
BoundedFloat.
Type Aliases§
- Unbounded
Decimal - Decimal constrained only by rust_decimal’s maximum scale of 28.