procmod_scan/error.rs
1/// The result type for procmod-scan operations.
2pub type Result<T> = std::result::Result<T, Error>;
3
4/// Errors that can occur during pattern operations.
5#[derive(Debug, Clone, PartialEq, Eq)]
6pub enum Error {
7 /// The pattern string is malformed or empty.
8 InvalidPattern(String),
9}
10
11impl std::fmt::Display for Error {
12 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
13 match self {
14 Error::InvalidPattern(msg) => write!(f, "invalid pattern: {msg}"),
15 }
16 }
17}
18
19impl std::error::Error for Error {}