pub struct TriggerFilter {
pub event_type: Option<String>,
pub source: Option<String>,
pub subject_pattern: Option<String>,
pub attributes: Vec<(String, String)>,
}Expand description
Filter criteria for a Trigger
All non-None fields must match (AND logic). A filter with all fields set to None matches every event.
Fields§
§event_type: Option<String>Match events with this exact event_type
source: Option<String>Match events from this source
subject_pattern: Option<String>Match events whose subject matches this pattern (supports > and * wildcards)
attributes: Vec<(String, String)>Match events that contain all of these metadata key-value pairs
Implementations§
Source§impl TriggerFilter
impl TriggerFilter
Sourcepub fn by_type(event_type: impl Into<String>) -> Self
pub fn by_type(event_type: impl Into<String>) -> Self
Create a filter matching a specific event type
Sourcepub fn by_subject(pattern: impl Into<String>) -> Self
pub fn by_subject(pattern: impl Into<String>) -> Self
Create a filter matching a subject pattern
Trait Implementations§
Source§impl Clone for TriggerFilter
impl Clone for TriggerFilter
Source§fn clone(&self) -> TriggerFilter
fn clone(&self) -> TriggerFilter
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 TriggerFilter
impl Debug for TriggerFilter
Source§impl Default for TriggerFilter
impl Default for TriggerFilter
Source§fn default() -> TriggerFilter
fn default() -> TriggerFilter
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TriggerFilter
impl RefUnwindSafe for TriggerFilter
impl Send for TriggerFilter
impl Sync for TriggerFilter
impl Unpin for TriggerFilter
impl UnsafeUnpin for TriggerFilter
impl UnwindSafe for TriggerFilter
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