pub struct EventSource {
pub rule: Option<String>,
pub via: Option<String>,
}Expand description
Where one event retained by a correlation came from.
rule is the reference the event matched, as written in the rules: list
of the correlation that buffered it. via names the child correlation that
delivered the event to a chained correlation, by its id, else its name,
else its title, and is absent on events a correlation matched directly.
Both are absent on events restored from a state snapshot that predates
them.
use rsigma_eval::EventSource;
let direct = EventSource {
rule: Some("failed_login".into()),
via: None,
};
assert_eq!(
serde_json::to_string(&direct).unwrap(),
r#"{"rule":"failed_login"}"#
);
let chained = EventSource {
rule: Some("failed_login".into()),
via: Some("brute-burst".into()),
};
assert_eq!(
serde_json::to_string(&chained).unwrap(),
r#"{"rule":"failed_login","via":"brute-burst"}"#
);Fields§
§rule: Option<String>The referenced rule the event matched.
via: Option<String>The child correlation that delivered the event.
Trait Implementations§
Source§impl Clone for EventSource
impl Clone for EventSource
Source§impl Debug for EventSource
impl Debug for EventSource
Source§impl Default for EventSource
impl Default for EventSource
impl Eq for EventSource
Source§impl PartialEq for EventSource
impl PartialEq for EventSource
Source§impl Serialize for EventSource
impl Serialize for EventSource
impl StructuralPartialEq for EventSource
Auto Trait Implementations§
impl Forget for EventSource
impl Freeze for EventSource
impl Move for EventSource
impl RefUnwindSafe for EventSource
impl Send for EventSource
impl Sync for EventSource
impl Unpin for EventSource
impl UnsafeUnpin for EventSource
impl UnwindSafe for EventSource
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.