pub struct IdSet<Id: Ord> { /* private fields */ }Expand description
A membership predicate over a set of ids — the canonical pub/sub filter.
contains is true when the set holds id; as a
SendPipe it admits (Ok(id)) or rejects (Err(id)) the id flowing
through it. Build one as the initial for live_filter and grow it
live with FilterUpdate.
Serde-transparent: it round-trips as a bare array of ids, so a subscription’s
set is exactly what you load from config or ship over the wire (the config
mirror; the layered conflaguration loader attaches at the service that
composes this, per the workspace config principle’s layering caveat).
Implementations§
Trait Implementations§
Source§impl<'de, Id> Deserialize<'de> for IdSet<Id>where
Id: Deserialize<'de> + Ord,
impl<'de, Id> Deserialize<'de> for IdSet<Id>where
Id: Deserialize<'de> + Ord,
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<Id: Eq + Ord> Eq for IdSet<Id>
Source§impl<Id: Ord> FromIterator<Id> for IdSet<Id>
impl<Id: Ord> FromIterator<Id> for IdSet<Id>
Source§fn from_iter<Iter: IntoIterator<Item = Id>>(iter: Iter) -> Self
fn from_iter<Iter: IntoIterator<Item = Id>>(iter: Iter) -> Self
Creates a value from an iterator. Read more
impl<Id: PartialEq + Ord> StructuralPartialEq for IdSet<Id>
Auto Trait Implementations§
impl<Id> Freeze for IdSet<Id>
impl<Id> RefUnwindSafe for IdSet<Id>where
BTreeSet<Id>: RefUnwindSafe,
impl<Id> Send for IdSet<Id>
impl<Id> Sync for IdSet<Id>
impl<Id> Unpin for IdSet<Id>
impl<Id> UnsafeUnpin for IdSet<Id>where
BTreeSet<Id>: UnsafeUnpin,
impl<Id> UnwindSafe for IdSet<Id>where
BTreeSet<Id>: UnwindSafe,
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.