#[non_exhaustive]
pub enum ConfigError {
    InvalidTimeout {
        name: Cow<'static, str>,
        reason: Cow<'static, str>,
        set_by: Cow<'static, str>,
    },
    ParseError {
        name: Cow<'static, str>,
        set_by: Cow<'static, str>,
        source: Box<dyn Error>,
    },
}
Expand description

An error that occurs during construction of a timeout::Config

Variants (Non-exhaustive)

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

InvalidTimeout

Fields

name: Cow<'static, str>

The name of the invalid value

reason: Cow<'static, str>

The reason that why the timeout was considered invalid

set_by: Cow<'static, str>

Where the invalid value originated from

A timeout value was set to an invalid value:

  • Any number less than 0
  • Infinity or negative infinity
  • NaN

ParseError

Fields

name: Cow<'static, str>

The name of the invalid value

set_by: Cow<'static, str>

Where the invalid value originated from

source: Box<dyn Error>

The source of this error

The timeout value couln’t be parsed as an f32

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. 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.

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.