pub struct ObjectRefSet<ObjectType: 'static>(/* private fields */);
Expand description
A collection of ObjectRef
s.
Implementations§
Source§impl<ObjectType> ObjectRefSet<ObjectType>
impl<ObjectType> ObjectRefSet<ObjectType>
pub fn new() -> Self
Sourcepub fn add(&mut self, id: ObjectRef<ObjectType>) -> bool
pub fn add(&mut self, id: ObjectRef<ObjectType>) -> bool
Adds id
into the set.
Returns true
iff the item was inserted. If false
is returned then an
entry with the same id already exists in the set.
Sourcepub fn remove(&mut self, id: ObjectRef<ObjectType>) -> bool
pub fn remove(&mut self, id: ObjectRef<ObjectType>) -> bool
Removesid
from the set.
Returns true
iff the item was removed. If false
is returned then an
entry with a matching id
did not exist in the set.
pub fn iter(&self) -> impl Iterator<Item = &ObjectRef<ObjectType>>
Auto Trait Implementations§
impl<ObjectType> Freeze for ObjectRefSet<ObjectType>
impl<ObjectType> RefUnwindSafe for ObjectRefSet<ObjectType>where
ObjectType: RefUnwindSafe,
impl<ObjectType> Send for ObjectRefSet<ObjectType>where
ObjectType: Send,
impl<ObjectType> Sync for ObjectRefSet<ObjectType>where
ObjectType: Sync,
impl<ObjectType> Unpin for ObjectRefSet<ObjectType>where
ObjectType: Unpin,
impl<ObjectType> UnwindSafe for ObjectRefSet<ObjectType>where
ObjectType: 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