pub struct EventFilter {
pub source: Option<String>,
pub device_id: Option<String>,
pub extension_id: Option<String>,
pub agent_id: Option<String>,
pub rule_id: Option<String>,
pub workflow_id: Option<String>,
pub expression: Option<String>,
}Expand description
Event filter for subscriptions.
Fields§
§source: Option<String>§device_id: Option<String>§extension_id: Option<String>§agent_id: Option<String>§rule_id: Option<String>§workflow_id: Option<String>§expression: Option<String>Implementations§
Source§impl EventFilter
impl EventFilter
pub fn new() -> Self
pub fn by_source(self, source: impl Into<String>) -> Self
pub fn by_device_id(self, device_id: impl Into<String>) -> Self
pub fn by_extension_id(self, extension_id: impl Into<String>) -> Self
pub fn matches(&self, _event_type: &str, event_value: &Value) -> bool
Trait Implementations§
Source§impl Clone for EventFilter
impl Clone for EventFilter
Source§fn clone(&self) -> EventFilter
fn clone(&self) -> EventFilter
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 EventFilter
impl Debug for EventFilter
Source§impl Default for EventFilter
impl Default for EventFilter
Source§fn default() -> EventFilter
fn default() -> EventFilter
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for EventFilter
impl<'de> Deserialize<'de> for EventFilter
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
Auto Trait Implementations§
impl Freeze for EventFilter
impl RefUnwindSafe for EventFilter
impl Send for EventFilter
impl Sync for EventFilter
impl Unpin for EventFilter
impl UnsafeUnpin 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