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,
},
InvalidBlobBackendProject {
name: String,
reason: &'static str,
cure: &'static str,
},
InvalidListener {
name: String,
reason: &'static str,
cure: &'static str,
},
Resolve(String),
}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.
Fields
InvalidBlobBackendProject
A [serve.blob_backends.<project>] key is not a valid project name, or is the reserved
default project (which always resolves the global [serve] backend). Refused at config load
(fail-closed) rather than silently binding a project’s blobs to the wrong backend.
Fields
InvalidListener
A [serve.listeners.<name>] (host-owned inbound-TCP listener, PLAN-handler-tcp-inbound) is
invalid: a blank component, a non-positive max_conns/timeout, a declared-but-unsupported
tls block (Phase 1 is plaintext-only), or a non-empty egress_allowlist (a
tcp-connection-host guest imports only wasi:io — it cannot hold wasi:sockets). Refused at
config load (fail-closed, boot-LOUD) rather than binding a listener that would silently
mislead the operator.
Fields
Resolve(String)
The layered config pipeline failed to resolve/extract the merged config (a bad
numeric/addr env value that figment’s lossy coercion rejects, a [cluster] missing
its required listen, etc.). The figment error is rendered to a string so
ConfigError stays small.
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