pub struct EventFilter {
pub sister_type: Option<SisterType>,
pub event_types: Option<Vec<String>>,
pub context_id: Option<ContextId>,
}Expand description
Filter for subscribing to events.
Fields§
§sister_type: Option<SisterType>Filter by sister type.
event_types: Option<Vec<String>>Filter by event type names.
context_id: Option<ContextId>Filter by context.
Implementations§
Source§impl EventFilter
impl EventFilter
pub fn new() -> Self
pub fn for_sister(self, sister_type: SisterType) -> Self
pub fn in_context(self, context_id: ContextId) -> Self
Sourcepub fn matches(&self, event: &SisterEvent) -> bool
pub fn matches(&self, event: &SisterEvent) -> bool
Check if an event matches this filter.
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 · 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
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