pub struct EventFilter {
pub thread_id: Option<ThreadId>,
pub turn_id: Option<TurnId>,
pub source: Option<EventSource>,
pub kinds: Vec<String>,
}Fields§
§thread_id: Option<ThreadId>§turn_id: Option<TurnId>§source: Option<EventSource>§kinds: Vec<String>Implementations§
Source§impl EventFilter
impl EventFilter
pub fn for_thread(thread_id: impl Into<ThreadId>) -> Self
pub fn for_turn( thread_id: impl Into<ThreadId>, turn_id: impl Into<TurnId>, ) -> Self
pub fn with_source(self, source: EventSource) -> Self
pub fn with_kind(self, kind: impl Into<String>) -> Self
pub fn matches(&self, envelope: &EventEnvelope) -> 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
impl Eq for EventFilter
Source§impl PartialEq for EventFilter
impl PartialEq for EventFilter
Source§fn eq(&self, other: &EventFilter) -> bool
fn eq(&self, other: &EventFilter) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for EventFilter
impl Serialize for EventFilter
impl StructuralPartialEq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.