pub enum Error {
Io {
path: PathBuf,
source: Error,
},
Yaml {
path: PathBuf,
source: Error,
},
Config {
name: String,
reason: String,
},
Cel {
name: String,
index: usize,
reason: String,
},
CelFeatureDisabled {
name: String,
},
}Expand description
Errors surfaced by registration, config loading, and CEL compilation.
Detection itself (crate::Registry::detect) is infallible — an
unreadable directory yields an empty match list rather than an error,
mirroring the Go library’s Detect.
Variants§
Io
An I/O error reading a config file or walking the tree.
Fields
Yaml
A YAML parse error while loading a project-type config.
Config
A project-type config entry failed validation (e.g. missing name, no indicators, or an indicator with no rule set).
Fields
Cel
A CEL indicator failed to compile.
Fields
CelFeatureDisabled
A project type uses a CEL indicator but the cel cargo feature is
not enabled. Mirrors the Go “no CEL compiler installed” error.
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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for Error
impl !UnwindSafe for Error
impl Freeze for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnsafeUnpin for Error
Blanket Implementations§
Source§impl<T> AnyExt for T
impl<T> AnyExt for T
Source§fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
fn downcast_ref<T>(this: &Self) -> Option<&T>where
T: Any,
Attempts to downcast this to
T behind referenceSource§fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
fn downcast_mut<T>(this: &mut Self) -> Option<&mut T>where
T: Any,
Attempts to downcast this to
T behind mutable referenceSource§fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
fn downcast_rc<T>(this: Rc<Self>) -> Result<Rc<T>, Rc<Self>>where
T: Any,
Attempts to downcast this to
T behind Rc pointerSource§fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
fn downcast_arc<T>(this: Arc<Self>) -> Result<Arc<T>, Arc<Self>>where
T: Any,
Attempts to downcast this to
T behind Arc pointerSource§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
Mutably borrows from an owned value. Read more