pub enum Error {
Show 20 variants
Parse {
message: String,
location: String,
source_text: Option<String>,
},
RuleFileLoad {
path: PathBuf,
source: Error,
},
RegexCompile {
pattern: String,
source: Error,
},
PatternSet {
message: String,
},
InvalidIp {
value: String,
message: String,
},
UnknownVariable {
name: String,
},
UnknownOperator {
name: String,
},
UnknownTransformation {
name: String,
},
UnknownAction {
name: String,
},
InvalidActionArgument {
action: String,
message: String,
},
MissingRuleId,
DuplicateRuleId {
id: u64,
},
IncompleteChain,
ProcessUri {
message: String,
},
ProcessRequestHeaders {
message: String,
},
ProcessRequestBody {
message: String,
},
ProcessResponseHeaders {
message: String,
},
ProcessResponseBody {
message: String,
},
Config {
message: String,
},
Internal {
message: String,
},
}Expand description
Main error type for sentinel-modsec operations.
Variants§
Parse
Error parsing a SecRule directive.
Fields
RuleFileLoad
Error loading a rule file.
RegexCompile
Error compiling a regex pattern.
PatternSet
Error compiling an Aho-Corasick pattern set.
InvalidIp
Error parsing an IP address or network.
UnknownVariable
Unknown variable name.
UnknownOperator
Unknown operator name.
UnknownTransformation
Unknown transformation name.
UnknownAction
Unknown action name.
InvalidActionArgument
Invalid action argument.
MissingRuleId
Rule is missing required ‘id’ action.
DuplicateRuleId
Duplicate rule ID.
IncompleteChain
Rule chain is incomplete.
ProcessUri
Error processing URI.
ProcessRequestHeaders
Error processing request headers.
ProcessRequestBody
Error processing request body.
ProcessResponseHeaders
Error processing response headers.
ProcessResponseBody
Error processing response body.
Config
Configuration error.
Internal
Internal error (should not happen in normal operation).
Implementations§
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 Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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
Mutably borrows from an owned value. Read more