#[non_exhaustive]pub enum MetadataError {
DuplicateName(String),
VarNotFound(VarId),
ProjectNotFound(ProjectId),
Invalid(String),
KindMismatch {
id: VarId,
expected: VarKind,
actual: VarKind,
},
Backend(String),
}Expand description
Errors that can occur while interacting with a
MetadataStore.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DuplicateName(String)
A variable with the given name already exists in the registry.
VarNotFound(VarId)
No variable with the given identifier was found.
ProjectNotFound(ProjectId)
No project with the given identifier was found.
Invalid(String)
A value supplied to the metadata layer failed a domain invariant.
KindMismatch
An operation that requires a specific VarKind (e.g. storing a
plain value) was invoked on a variable of the wrong kind.
This guards against secrets accidentally flowing into the plain-value side table — every backend must enforce this rule, never silently accept a kind mismatch.
Fields
Backend(String)
The underlying storage backend reported an unexpected failure.
Backend implementors MUST NOT include secret material, variable
values, or absolute paths that disclose the user’s home directory in
this string. Wrap raw backend errors with a category label (e.g.
"sqlite write failed") rather than format!("{e}") that may
propagate parameter values from a failed query.
Trait Implementations§
Source§impl Debug for MetadataError
impl Debug for MetadataError
Source§impl Display for MetadataError
impl Display for MetadataError
Source§impl Error for MetadataError
impl Error for MetadataError
1.30.0 · 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()