Enum valid_toml::ValidationError
[−]
[src]
pub enum ValidationError { CannotParse(Option<FormatDesc>), DurationOverflow(Option<String>, Option<String>), DurationUnderrun(Option<String>, Option<String>), IncorrectType(&'static str), Long(Option<usize>, Option<usize>), Overflow(Option<i64>, Option<i64>), Short(Option<usize>, Option<usize>), Underrun(Option<i64>, Option<i64>), }
Holds a validation error. A validation error occurs when a value is defined in the TOML file but does not match the rules defined for that value.
Variants
CannotParse(Option<FormatDesc>)
A value could not be parsed, contains an optional error describing the parse error.
DurationOverflow(Option<String>, Option<String>)
A duration value is too large. Contains the min/max lengths, the second value (max) will be defined, the min size may or may not be defined.
DurationUnderrun(Option<String>, Option<String>)
A duration value is too small. Contains the min/max lengths, the fiurst value (min) will be defined, the max size may or may not be defined.
IncorrectType(&'static str)
A value is not the correct type and could not be read. The supplied value is the expected data type.
Long(Option<usize>, Option<usize>)
A string value is too long. Contains the min/max lengths, the second value (max) will be defined, the min size may or may not be defined.
Overflow(Option<i64>, Option<i64>)
A numeric value is too large. Contains the limits for the number, the second value (max) will be defined, the first value may or may not be defined.
Short(Option<usize>, Option<usize>)
A string value is too short. Contains the min/max lengths, the first value (min) will be defined, the max size may or may not be defined.
Underrun(Option<i64>, Option<i64>)
A numeric value is too small. Contains the limits for the number, the first value (min) will be defined, the second value may or may not be defined.