Skip to main content

Module validators

Module validators 

Source

Traits§

HasLen
Trait for values whose length can be queried.

Functions§

len_range
Ensure the value length falls within the provided range.
max_len
Ensure the value length does not exceed max.
min_len
Ensure the value length is at least min.
non_empty
Ensure that a collection-like value is not empty.
one_of
Ensure the value is present in a pre-defined set.
range
Ensure that a comparable scalar falls within the provided range.