pub struct EvaluationResult {
pub header: RuleHeader,
pub body: ResultBody,
}Expand description
A single evaluation result.
Wraps a detection match (ResultBody::Detection) or a correlation
firing (ResultBody::Correlation) behind one shared RuleHeader.
Serialize emits a single flat JSON object combining header and body
fields.
Fields§
§header: RuleHeader§body: ResultBodyImplementations§
Source§impl EvaluationResult
impl EvaluationResult
Sourcepub fn is_detection(&self) -> bool
pub fn is_detection(&self) -> bool
True when this result was produced by detection rule matching.
Sourcepub fn is_correlation(&self) -> bool
pub fn is_correlation(&self) -> bool
True when this result was produced by a correlation firing.
Sourcepub fn as_detection(&self) -> Option<&DetectionBody>
pub fn as_detection(&self) -> Option<&DetectionBody>
Read the detection-specific body, if this result is a detection.
Sourcepub fn as_correlation(&self) -> Option<&CorrelationBody>
pub fn as_correlation(&self) -> Option<&CorrelationBody>
Read the correlation-specific body, if this result is a correlation.
Sourcepub fn as_detection_mut(&mut self) -> Option<&mut DetectionBody>
pub fn as_detection_mut(&mut self) -> Option<&mut DetectionBody>
Mutable accessor for the detection-specific body.
Sourcepub fn as_correlation_mut(&mut self) -> Option<&mut CorrelationBody>
pub fn as_correlation_mut(&mut self) -> Option<&mut CorrelationBody>
Mutable accessor for the correlation-specific body.
Trait Implementations§
Source§impl Clone for EvaluationResult
impl Clone for EvaluationResult
Source§fn clone(&self) -> EvaluationResult
fn clone(&self) -> EvaluationResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EvaluationResult
impl Debug for EvaluationResult
Auto Trait Implementations§
impl Freeze for EvaluationResult
impl RefUnwindSafe for EvaluationResult
impl Send for EvaluationResult
impl Sync for EvaluationResult
impl Unpin for EvaluationResult
impl UnsafeUnpin for EvaluationResult
impl UnwindSafe for EvaluationResult
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