[−][src]Enum rocket::config::ConfigError
The type of a configuration error.
Variants
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)
BadEnv(String)
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)
UnknownKey(String)
The entry (key) is unknown.
Parameters: (key)
Missing(String)
The entry (key) was expected but was missing.
Parameters: (key)
Methods
impl ConfigError
[src]
pub fn pretty_print(&self)
[src]
Prints this configuration error with Rocket formatting.
pub fn is_not_found(&self) -> bool
[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]
impl Display for ConfigError
[src]
impl Error for ConfigError
[src]
fn description(&self) -> &str
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn cause(&self) -> Option<&dyn Error>
1.0.0[src]
impl PartialEq<ConfigError> for ConfigError
[src]
Auto Trait Implementations
impl !RefUnwindSafe for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl !UnwindSafe for ConfigError
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T, I> AsResult<T, I> for T where
I: Input,
[src]
I: Input,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoCollection<T> for T
[src]
fn into_collection<A>(self) -> SmallVec<A> where
A: Array<Item = T>,
[src]
A: Array<Item = T>,
fn mapped<U, F, A>(self, f: F) -> SmallVec<A> where
A: Array<Item = U>,
F: FnMut(T) -> U,
[src]
A: Array<Item = U>,
F: FnMut(T) -> U,
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
[src]
T: Any,