1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
//! Property traits
//!
//! This module defines property traits that enable the generic implementation
//! of the [`Validate`] trait of the provided constraints.
//!
//! Property traits are one way to derive an implementation of [`Validate`]
//! trait for a custom type. For example if we have a custom type that
//! represents some kind of decimal number for which we implement the
//! [`HasDecimalDigits`] trait we can use the existing implementation of the
//! [`Validate`] trait for the [`Digits`] constraint and our custom type.
//!
//! [`Digits`]: ../constraint/struct.Digits.html
//! [`HasDecimalDigits`]: trait.HasDecimalDigits.html
//! [`Validate`]: ../trait.Validate.html
/// The checked property of a type.
///
/// This can be property of enums with 2 variants that have a similar meaning to
/// the boolean type, e.g. yes/no, agreed/rejected, open/closed, etc.
/// The empty property of a type.
///
/// This is usually a property of some kind of container like `String`, `Vec`,
/// `HashSet` or `HashMap`.
/// The length property of a type.
///
/// This is usually a property of some kind of container like `String`, `Vec`,
/// `HashSet`, `HashMap` or `&[T]`.
/// The number of characters property of a type.
///
/// Counts the number of contained characters. The character count may be
/// different from the length if any character occupies more than one byte in
/// memory.
///
/// This is usually a property of a container of `char`s like `String`,
/// `Vec<char>` or `&[char]`
/// Defines that a type has a zero value.
/// Properties of a decimal number.
/// Determines whether the given element is part of a value or member of
/// a collection.
///
/// This is usually a property of some kind of container like `String`, `Vec`,
/// `HashSet` or `&[T]`.