Enum rocket::config::ConfigError [] [src]

pub enum ConfigError {
    BadCWD,
    NotFound,
    IoError,
    Io(Error, &'static str),
    BadFilePath(PathBuf, &'static str),
    BadEnv(String),
    BadEntry(StringPathBuf),
    BadType(String, &'static str, &'static strPathBuf),
    ParseError(StringPathBufStringOption<(usize, usize)>),
    BadEnvVal(StringStringString),
    UnknownKey(String),
}

The type of a configuration error.

Variants

The current working directory could not be determined.

The configuration file was not found.

There was an I/O error while reading the configuration file.

There was an I/O error while setting a configuration parameter.

Parameters: (io_error, config_param_name)

The path at which the configuration file was found was invalid.

Parameters: (path, reason)

An environment specified in ROCKET_ENV is invalid.

Parameters: (environment_name)

An environment specified as a table [environment] is invalid.

Parameters: (environment_name, filename)

A config key was specified with a value of the wrong type.

Parameters: (entry_name, expected_type, actual_type, filename)

There was a TOML parsing error.

Parameters: (toml_source_string, filename, error_description, line/col)

There was a TOML parsing error in a config environment variable.

Parameters: (env_key, env_value, error)

The entry (key) is unknown.

Parameters: (key)

Methods

impl ConfigError
[src]

[src]

Prints this configuration error with Rocket formatting.

[src]

Returns true if self is of NotFound variant.

Example

use rocket::config::ConfigError;

let error = ConfigError::NotFound;
assert!(error.is_not_found());

Trait Implementations

impl Debug for ConfigError
[src]

[src]

Formats the value using the given formatter.

impl Display for ConfigError
[src]

[src]

Formats the value using the given formatter. Read more

impl Error for ConfigError
[src]

[src]

A short description of the error. Read more

1.0.0
[src]

The lower-level cause of this error, if any. Read more

impl PartialEq for ConfigError
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.