pub enum Error {
UnableToLoadFromEnvironmentVariable {
source: LocatedError<'static, dyn Error + Send + Sync>,
},
CreatedNewConfigHalt {
location: &'static Location<'static>,
path: String,
},
ConfigError {
source: LocatedError<'static, ConfigError>,
},
}Expand description
Errors that can occur when loading the configuration.
Variants§
UnableToLoadFromEnvironmentVariable
Fields
§
source: LocatedError<'static, dyn Error + Send + Sync>Unable to load the configuration from the environment variable.
This error only occurs if there is no configuration file and the
TORRUST_TRACKER_CONFIG environment variable is not set.
CreatedNewConfigHalt
If you run the tracker without providing the configuration (via the
TORRUST_TRACKER_CONFIG environment variable or configuration file),
the tracker will create a default configuration file but it will not
load it. It will return this error instead and you have to restart the
it.
ConfigError
Fields
§
source: LocatedError<'static, ConfigError>Unable to load the configuration from the configuration file.
Trait Implementations§
source§impl Error for Error
impl Error for Error
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<ConfigError> for Error
impl From<ConfigError> for Error
source§fn from(err: ConfigError) -> Self
fn from(err: ConfigError) -> Self
Converts to this type from the input type.