pub enum ConfigError {
File {
path: String,
source: Box<Self>,
},
Ron(SpannedError),
Json(Error),
Routing(ConfigError),
Io(Error),
Env {
var: String,
reason: String,
},
InvalidDbName {
name: String,
reason: &'static str,
cure: &'static str,
},
}Expand description
A failure loading or parsing a local config file (project.cfg / boatramp.cfg).
Variants§
File
Wraps an underlying error with the file path it came from.
Ron(SpannedError)
The RON document failed to parse.
Json(Error)
The JSON document failed to parse (JSON config input — e.g. from
nickel export). Same strictness as RON: deny_unknown_fields on the
structs makes a typo’d/unknown key a hard error here, not a silent drop.
Routing(ConfigError)
The routing section failed its compile-check.
Io(Error)
Reading the file failed (other than not-found, which yields defaults).
Env
An environment-variable override could not be parsed (bad number/bool).
Fields
InvalidDbName
A handlers.bindings.sql.databases binding name is not a safe URL path
segment — it is threaded verbatim into /api/sql/{db}/… and --db, so an
empty///-collapsing or path-separator-bearing name is refused at load
(fail-closed) rather than emitting a malformed control-plane path.
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<ConfigError> for ConfigError
impl From<ConfigError> for ConfigError
Source§fn from(source: ConfigError) -> Self
fn from(source: ConfigError) -> Self
Source§impl From<Error> for ConfigError
impl From<Error> for ConfigError
Source§impl From<Error> for ConfigError
impl From<Error> for ConfigError
Source§impl From<SpannedError> for ConfigError
impl From<SpannedError> for ConfigError
Source§fn from(source: SpannedError) -> Self
fn from(source: SpannedError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for ConfigError
impl !UnwindSafe for ConfigError
impl Freeze for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl UnsafeUnpin for ConfigError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more