pub struct EventIdSet<E: Borrow<EventId>>(/* private fields */);Expand description
A set of event IDs.
Implementations§
Source§impl<E: Borrow<EventId>> EventIdSet<E>
impl<E: Borrow<EventId>> EventIdSet<E>
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create an empty EventIdSet with the given capacity.
Sourcepub fn iter(&self) -> EventIdSetIter<'_, E> ⓘ
pub fn iter(&self) -> EventIdSetIter<'_, E> ⓘ
Gets an iterator over the elements of the set.
Source§impl<E> EventIdSet<E>
impl<E> EventIdSet<E>
Sourcepub fn contains(&self, event_id: &EventId) -> bool
pub fn contains(&self, event_id: &EventId) -> bool
Returns true if the set contains the specified event ID.
Sourcepub fn get(&self, event_id: &EventId) -> Option<&E>
pub fn get(&self, event_id: &EventId) -> Option<&E>
Returns a reference to the event ID in the set, if any, that is equal to the given one.
Sourcepub fn insert(&mut self, event_id: E) -> bool
pub fn insert(&mut self, event_id: E) -> bool
Adds an event ID to the set.
Returns whether the ID was newly inserted.
Sourcepub fn remove(&mut self, event_id: &EventId) -> bool
pub fn remove(&mut self, event_id: &EventId) -> bool
Removes an event ID from the set.
Returns whether the ID was present in the set.
Sourcepub fn take(&mut self, event_id: &EventId) -> Option<E>
pub fn take(&mut self, event_id: &EventId) -> Option<E>
Removes and returns the event ID in the set, if any, that is equal to the given one.
Sourcepub fn intersection<'a>(
&'a self,
other: &'a Self,
) -> EventIdSetIntersection<'a, E> ⓘ
pub fn intersection<'a>( &'a self, other: &'a Self, ) -> EventIdSetIntersection<'a, E> ⓘ
Visits the values representing the intersection, i.e., the values that are both in self and other.
Trait Implementations§
Source§impl<E: Clone + Borrow<EventId>> Clone for EventIdSet<E>
impl<E: Clone + Borrow<EventId>> Clone for EventIdSet<E>
Source§fn clone(&self) -> EventIdSet<E>
fn clone(&self) -> EventIdSet<E>
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<E> Extend<E> for EventIdSet<E>
impl<E> Extend<E> for EventIdSet<E>
Source§fn extend<T: IntoIterator<Item = E>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = E>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
Source§impl<E> FromIterator<E> for EventIdSet<E>
impl<E> FromIterator<E> for EventIdSet<E>
Source§fn from_iter<T: IntoIterator<Item = E>>(iter: T) -> Self
fn from_iter<T: IntoIterator<Item = E>>(iter: T) -> Self
Creates a value from an iterator. Read more
Source§impl<'a, E: Borrow<EventId>> IntoIterator for &'a EventIdSet<E>
impl<'a, E: Borrow<EventId>> IntoIterator for &'a EventIdSet<E>
Source§impl<E: Borrow<EventId>> IntoIterator for EventIdSet<E>
impl<E: Borrow<EventId>> IntoIterator for EventIdSet<E>
Auto Trait Implementations§
impl<E> Freeze for EventIdSet<E>
impl<E> RefUnwindSafe for EventIdSet<E>where
E: RefUnwindSafe,
impl<E> Send for EventIdSet<E>where
E: Send,
impl<E> Sync for EventIdSet<E>where
E: Sync,
impl<E> Unpin for EventIdSet<E>where
E: Unpin,
impl<E> UnsafeUnpin for EventIdSet<E>
impl<E> UnwindSafe for EventIdSet<E>where
E: 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,
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§unsafe fn consume_handle(handle: Handle) -> Arc<T>
unsafe fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<> Read more