pub enum ValidationError {
    InvalidRange {
        field: String,
        message: RangeError,
    },
    NoWords,
    NonAsciiSpecialChars,
}
Expand description

The possible errors when checking the configuration.

Variants

InvalidRange

Fields

field: String
message: RangeError

For when the range processor doesn’t receive either a “20-30” or a “25” style string.

The range processor does some clean-up beforehand to remove trailing and repeating dashes. So ---20-----30-- becomes 20-30, and gives no error or custom message in this case.

NoWords

For when the Config holds either one or zero words. The reason one word isn’t allowed is due to the use of std::iter::Peekable.

NonAsciiSpecialChars

For when non-ASCII characters are found in special_chars.

Trait Implementations

Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
👎Deprecated since 1.42.0: use the Display impl or to_string()
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
The lower-level source of this error, if any. Read more
🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type based access to context intended for error reports. Read more
Returns a Backtrace that may be printed.
Returns an iterator for traversing the chain of errors, starting with the current error and continuing with recursive calls to Error::source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
For maximum effectiveness, this needs to be called as a method to benefit from Rust’s automatic dereferencing of method receivers. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

🔬This is a nightly-only experimental API. (provide_any)
Data providers should implement this method to provide all values they are able to provide by using demand. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.