Enum rocket::config::ConfigError
[−]
[src]
pub enum ConfigError { BadCWD, NotFound, IOError, BadFilePath(PathBuf, &'static str), BadEnv(String), BadEntry(String, PathBuf), BadType(String, &'static str, &'static str, PathBuf), ParseError(String, PathBuf, Vec<ParsingError>), BadEnvVal(String, String, &'static str), }
The type of a configuration error.
Variants
BadCWD
The current working directory could not be determined.
NotFound
The configuration file was not found.
IOError
There was an I/O error while reading the configuration file.
BadFilePath(PathBuf, &'static str)
The path at which the configuration file was found was invalid.
Parameters: (path, reason)
BadEnv(String)
An environment specified in ROCKET_ENV
is invalid.
Parameters: (environment_name)
BadEntry(String, PathBuf)
An environment specified as a table [environment]
is invalid.
Parameters: (environment_name, filename)
BadType(String, &'static str, &'static str, PathBuf)
A config key was specified with a value of the wrong type.
Parameters: (entry_name, expected_type, actual_type, filename)
ParseError(String, PathBuf, Vec<ParsingError>)
There was a TOML parsing error.
Parameters: (toml_source_string, filename, error_list)
BadEnvVal(String, String, &'static str)
There was a TOML parsing error in a config environment variable.
Parameters: (env_key, env_value, expected type)
Methods
impl ConfigError
[src]
fn pretty_print(&self)
Prints this configuration error with Rocket formatting.
fn is_not_found(&self) -> bool
Whether this error is of NotFound
variant.
Trait Implementations
impl Debug for ConfigError
[src]
impl PartialEq for ConfigError
[src]
fn eq(&self, __arg_0: &ConfigError) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ConfigError) -> bool
This method tests for !=
.
impl Clone for ConfigError
[src]
fn clone(&self) -> ConfigError
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more