pub struct BasicHazardCollector<E = BasicHazardEntity> { /* private fields */ }Expand description
A basic HazardCollector storing hazards by their HazKey.
Implementations§
Source§impl<E: HazardEntity> BasicHazardCollector<E>
impl<E: HazardEntity> BasicHazardCollector<E>
pub fn new() -> Self
pub fn with_capacity(capacity: usize) -> Self
pub fn clear(&mut self)
pub fn contains_key(&self, hkey: HazKey) -> bool
pub fn insert(&mut self, hkey: HazKey, entity: E) -> Option<E>
pub fn remove(&mut self, hkey: HazKey) -> Option<E>
pub fn retain(&mut self, predicate: impl FnMut(HazKey, &mut E) -> bool)
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn iter(&self) -> impl Iterator<Item = (HazKey, &E)>
Trait Implementations§
Source§impl<E: Clone> Clone for BasicHazardCollector<E>
impl<E: Clone> Clone for BasicHazardCollector<E>
Source§fn clone(&self) -> BasicHazardCollector<E>
fn clone(&self) -> BasicHazardCollector<E>
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<E: Debug> Debug for BasicHazardCollector<E>
impl<E: Debug> Debug for BasicHazardCollector<E>
Source§impl<E: HazardEntity> Default for BasicHazardCollector<E>
impl<E: HazardEntity> Default for BasicHazardCollector<E>
Source§impl<E: HazardEntity> HazardCollector for BasicHazardCollector<E>
impl<E: HazardEntity> HazardCollector for BasicHazardCollector<E>
fn contains_key(&self, hkey: HazKey) -> bool
fn insert(&mut self, hkey: HazKey, entity: E)
fn remove_by_key(&mut self, hkey: HazKey)
fn len(&self) -> usize
fn iter(&self) -> impl Iterator<Item = (HazKey, &E)>
fn contains_entity(&self, entity: &Self::Entity) -> bool
fn remove_by_entity(&mut self, entity: &Self::Entity)
fn is_empty(&self) -> bool
fn keys(&self) -> impl Iterator<Item = HazKey>
fn entities(&self) -> impl Iterator<Item = &Self::Entity>
Source§impl<'a, E> IntoIterator for &'a BasicHazardCollector<E>
impl<'a, E> IntoIterator for &'a BasicHazardCollector<E>
Auto Trait Implementations§
impl<E> Freeze for BasicHazardCollector<E>
impl<E> RefUnwindSafe for BasicHazardCollector<E>where
E: RefUnwindSafe,
impl<E> Send for BasicHazardCollector<E>where
E: Send,
impl<E> Sync for BasicHazardCollector<E>where
E: Sync,
impl<E> Unpin for BasicHazardCollector<E>where
E: Unpin,
impl<E> UnsafeUnpin for BasicHazardCollector<E>
impl<E> UnwindSafe for BasicHazardCollector<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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more