pub struct EventLogClassifier {
pub name: String,
pub keys: Vec<String>,
}Expand description
Event classifier
Enables classifying events by a set of attributes to consider for the class identity
Fields§
§name: StringName of the classifier
keys: Vec<String>List of attribute keys to consider for the class identity
Implementations§
Source§impl EventLogClassifier
impl EventLogClassifier
Sourcepub const DELIMITER: &'static str = "+"
pub const DELIMITER: &'static str = "+"
Delimiter for combining the values defined by the classifer to form a single class identity string
Sourcepub fn get_class_identity(&self, ev: &Event) -> String
pub fn get_class_identity(&self, ev: &Event) -> String
Get the class identity (joined with EventLogClassifier::DELIMITER)
Missing attributes and attributes with a type different than AttributeValue::String are represented by an empty String.
Sourcepub fn get_class_identity_with_globals(
&self,
ev: &Event,
global_attrs: &Option<Vec<Attribute>>,
) -> String
pub fn get_class_identity_with_globals( &self, ev: &Event, global_attrs: &Option<Vec<Attribute>>, ) -> String
Get the class identity (joined with EventLogClassifier::DELIMITER) using the global event attributes for default values
Missing attributes and attributes with a type different than AttributeValue::String are represented by an empty String.
Trait Implementations§
Source§impl Clone for EventLogClassifier
impl Clone for EventLogClassifier
Source§fn clone(&self) -> EventLogClassifier
fn clone(&self) -> EventLogClassifier
Returns a duplicate of the value. Read more
1.0.0 · 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 EventLogClassifier
impl Debug for EventLogClassifier
Source§impl Default for EventLogClassifier
impl Default for EventLogClassifier
Source§impl<'de> Deserialize<'de> for EventLogClassifier
impl<'de> Deserialize<'de> for EventLogClassifier
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for EventLogClassifier
impl PartialEq for EventLogClassifier
Source§impl Serialize for EventLogClassifier
impl Serialize for EventLogClassifier
impl StructuralPartialEq for EventLogClassifier
Auto Trait Implementations§
impl Freeze for EventLogClassifier
impl RefUnwindSafe for EventLogClassifier
impl Send for EventLogClassifier
impl Sync for EventLogClassifier
impl Unpin for EventLogClassifier
impl UnwindSafe for EventLogClassifier
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more