-
Sanitizer - an infallible operation on a piece of data that converts the data to some canonical form. Example: trim trailing spaces and lowercase an email address.
-
Validator - a fallible operation, that checks if a piece of data matches some given rules. Example: ensure that an email address contains
@character. Validators come with associated error variants. -
Guard - an umbrella term that covers both sanitizers and validators.
-
Inner Type - typically a simple type that is wrapped by a newtype. Example: consider
Emailtype defined asEmail(String). We have say thatEmailhas inner typeString. -
Transparent trait - a trait that can be simply derived (e.g.
Debug,Clone). -
Irregular trait - a trait that requires a custom implementation to be generated (e.g.
TryFrom). -
Unchecked trait - a trait that potentially may violate the constraints. Traits derive with
derive_unchecked(...)are not validated by nutype.