#[non_exhaustive]pub enum ConfigError {
NotFound,
ReadError {
path: PathBuf,
source: Error,
},
ParseError {
source: Error,
},
ValidationError {
field: String,
message: String,
},
MissingEnvVar {
name: String,
},
MultipleErrors {
errors: Vec<ConfigError>,
},
}Expand description
Errors that occur while loading or validating FraiseQL configuration.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
NotFound
No configuration file was found at the expected location(s).
ReadError
The configuration file was found but could not be read from disk.
ParseError
The configuration file was read successfully but contains invalid TOML or does not conform to the expected schema.
ValidationError
A configuration value failed a semantic validation rule (e.g. a port number that is out of range, or conflicting options).
Fields
MissingEnvVar
A required environment variable was not set at startup.
MultipleErrors
Several configuration errors were collected together (e.g. during a full-file validation pass) and are reported as a single error.
Fields
errors: Vec<ConfigError>All individual errors that were encountered.
Implementations§
Source§impl ConfigError
impl ConfigError
Sourcepub const fn error_code(&self) -> &'static str
pub const fn error_code(&self) -> &'static str
Returns a short, stable error code string suitable for API responses and structured logging.
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 RuntimeError
impl From<ConfigError> for RuntimeError
Source§fn from(source: ConfigError) -> Self
fn from(source: ConfigError) -> Self
Auto Trait Implementations§
impl Freeze for ConfigError
impl !RefUnwindSafe for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl UnsafeUnpin for ConfigError
impl !UnwindSafe 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
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