Creates a new `ValidityState`. All the fields except `valid` is set to false except `valid`, which is set to `true`
()
| 28 | /// All the fields except `valid` is set to false except `valid`, which is |
| 29 | /// set to `true` |
| 30 | pub fn new() -> Self { |
| 31 | Self { |
| 32 | bad_input: false, |
| 33 | custom_error: false, |
| 34 | pattern_mismatch: false, |
| 35 | range_overflow: false, |
| 36 | range_underflow: false, |
| 37 | too_long: false, |
| 38 | too_short: false, |
| 39 | type_mismatch: false, |
| 40 | valid: true, |
| 41 | value_missing: false, |
| 42 | } |
| 43 | } |
| 44 | |
| 45 | pub fn bad_input(&self) -> bool { |
| 46 | self.bad_input |
nothing calls this directly
no outgoing calls
no test coverage detected