#[non_exhaustive]pub enum Error {
Bind {
addr: String,
source: Error,
},
Registry(Error),
Server(Error),
Persist(Error),
PersistEncode(Error),
}Expand description
Errors surfaced by the public serve entry point.
All variants carry enough context (a path, the bind address, the underlying I/O error) to be actionable on their own — no need to chain back through the call site to figure out what went wrong.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Bind
Binding the TCP listener failed (port already in use, permission denied, …). The original I/O error is kept for diagnostics.
Registry(Error)
Loading the embedded site registry on startup failed. Practically unreachable since the JSON is shipped in the binary, but surfaced rather than swallowed so a corrupted custom override is visible.
Server(Error)
The axum server task returned an error (typically because the listener was closed or accept failed).
Persist(Error)
Reading or writing a persisted scan failed.
PersistEncode(Error)
Serialising a scan to JSON failed (should be unreachable —
CheckOutcome is well-defined serde data).
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()