pub enum FilterOperation {
Add(Vec<Filter>),
Remove(Vec<Filter>),
ReplaceAll(Vec<Filter>),
Clear,
}Expand description
Type-safe filter operations using unified Filter type
Variants§
Add(Vec<Filter>)
Add filters to the active set
Remove(Vec<Filter>)
Remove specific filters from the active set
ReplaceAll(Vec<Filter>)
Replace all filters (forces restart - use sparingly)
Clear
Clear all filters
Implementations§
Source§impl FilterOperation
impl FilterOperation
Sourcepub fn add_channels(channels: Vec<Vec<u8>>) -> Self
pub fn add_channels(channels: Vec<Vec<u8>>) -> Self
Add channels to the filter
Sourcepub fn remove_channels(channels: Vec<Vec<u8>>) -> Self
pub fn remove_channels(channels: Vec<Vec<u8>>) -> Self
Remove channels from the filter
Add authors to the filter
Remove authors from the filter
Sourcepub fn add_events(events: Vec<MessageId>) -> Self
pub fn add_events(events: Vec<MessageId>) -> Self
Add events to the filter
Sourcepub fn remove_events(events: Vec<MessageId>) -> Self
pub fn remove_events(events: Vec<MessageId>) -> Self
Remove events from the filter
Sourcepub fn remove_users(users: Vec<KeyId>) -> Self
pub fn remove_users(users: Vec<KeyId>) -> Self
Remove users from the filter
Sourcepub fn replace_all(filters: Vec<Filter>) -> Self
pub fn replace_all(filters: Vec<Filter>) -> Self
Replace all filters
Trait Implementations§
Source§impl Clone for FilterOperation
impl Clone for FilterOperation
Source§fn clone(&self) -> FilterOperation
fn clone(&self) -> FilterOperation
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 FilterOperation
impl Debug for FilterOperation
Source§impl<'de> Deserialize<'de> for FilterOperation
impl<'de> Deserialize<'de> for FilterOperation
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
Source§impl PartialEq for FilterOperation
impl PartialEq for FilterOperation
Source§impl Serialize for FilterOperation
impl Serialize for FilterOperation
impl StructuralPartialEq for FilterOperation
Auto Trait Implementations§
impl Freeze for FilterOperation
impl RefUnwindSafe for FilterOperation
impl Send for FilterOperation
impl Sync for FilterOperation
impl Unpin for FilterOperation
impl UnwindSafe for FilterOperation
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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