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

pub enum ConfigError {
    Io(Error, &'static str),
    BadFilePath(PathBuf, &'static str),
    BadType(String, &'static str, &'static strPathBuf),
    ParseError(StringPathBufStringOption<(usize, usize)>),

The type of a configuration error.


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)


impl ConfigError

Prints this configuration error with Rocket formatting.

Returns true if self is of NotFound variant.


use rocket::config::ConfigError;

let error = ConfigError::NotFound;

Trait Implementations

impl Debug for ConfigError

Formats the value using the given formatter. Read more

impl Display for ConfigError

Formats the value using the given formatter. Read more

impl Error for ConfigError

This method is soft-deprecated. Read more

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

impl PartialEq for ConfigError

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

This method tests for !=.

Auto Trait Implementations

impl Send for ConfigError

impl Sync for ConfigError