#[non_exhaustive]pub enum RulesetError {
InvalidSpec(Vec<String>),
MissingSource {
ruleset: Option<String>,
path: PathBuf,
},
Io {
ruleset: Option<String>,
path: PathBuf,
source: Error,
},
Confinement {
ruleset: Option<String>,
path: PathBuf,
},
Selector(String),
Dependency(Vec<String>),
Duplicate(String),
Overlay(String),
StaleOverlay(Vec<String>),
}Expand description
A failure while resolving a ruleset. Every variant maps to a configuration error (exit 3) at the CLI, except source parse errors, which follow each command’s existing policy.
Errors returned by resolve_ruleset and
resolve_loaded name the ruleset exactly once at
the start of their message. The list variants carry messages that are
already prefixed; the path variants carry the ruleset name in ruleset,
which is None only when they come straight from
load_sources or an OverlayLoader.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidSpec(Vec<String>)
The spec failed static validation; one message per problem.
MissingSource
A declared source does not exist.
Io
A source or overlay file could not be read.
Fields
Confinement
A path resolved outside ResolveOptions::confine_to.
Selector(String)
A selector could not be compiled.
Dependency(Vec<String>)
Correlation references that do not resolve under the policy.
Duplicate(String)
Two kept documents share an id or name.
Overlay(String)
An overlay could not be loaded or applied.
StaleOverlay(Vec<String>)
Overlays that match no kept document under stale_overlays: error.
Trait Implementations§
Source§impl Debug for RulesetError
impl Debug for RulesetError
Source§impl Display for RulesetError
impl Display for RulesetError
Source§impl Error for RulesetError
impl Error for RulesetError
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()