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
Source§impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
§impl<T> IntoAny for T
impl<T> IntoAny for T
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