pub struct EventFilter {
pub event_types: Vec<String>,
pub source_patterns: Vec<String>,
pub metadata_filters: HashMap<String, Value>,
pub min_priority: EventPriority,
}
Expand description
Event subscription filter
Fields§
§event_types: Vec<String>
Event types to match (empty means all)
source_patterns: Vec<String>
Source patterns to match
metadata_filters: HashMap<String, Value>
Metadata filters
min_priority: EventPriority
Minimum priority level
Implementations§
Source§impl EventFilter
impl EventFilter
Sourcepub fn with_event_type(self, event_type: impl Into<String>) -> Self
pub fn with_event_type(self, event_type: impl Into<String>) -> Self
Add event type filter
Sourcepub fn with_source_pattern(self, pattern: impl Into<String>) -> Self
pub fn with_source_pattern(self, pattern: impl Into<String>) -> Self
Add source pattern filter
Sourcepub fn with_metadata(self, key: impl Into<String>, value: Value) -> Self
pub fn with_metadata(self, key: impl Into<String>, value: Value) -> Self
Add metadata filter
Sourcepub fn with_min_priority(self, priority: EventPriority) -> Self
pub fn with_min_priority(self, priority: EventPriority) -> Self
Set minimum priority
Trait Implementations§
Source§impl Clone for EventFilter
impl Clone for EventFilter
Source§fn clone(&self) -> EventFilter
fn clone(&self) -> EventFilter
Returns a copy 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 EventFilter
impl Debug for EventFilter
Auto Trait Implementations§
impl Freeze for EventFilter
impl RefUnwindSafe for EventFilter
impl Send for EventFilter
impl Sync for EventFilter
impl Unpin for EventFilter
impl UnwindSafe for EventFilter
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,
§impl<T> InitializeFromFunction<T> for T
impl<T> InitializeFromFunction<T> for T
§fn initialize_from_function(f: fn() -> T) -> T
fn initialize_from_function(f: fn() -> T) -> T
Create an instance of this type from an initialization function
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
The none-equivalent value.
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
impl<T, O> SuperFrom<T> for Owhere
O: From<T>,
§fn super_from(input: T) -> O
fn super_from(input: T) -> O
Convert from a type to another type.
§impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
impl<T, O, M> SuperInto<O, M> for Twhere
O: SuperFrom<T, M>,
§fn super_into(self) -> O
fn super_into(self) -> O
Convert from a type to another type.