Struct imageflow_types::collections::AddRemoveSet
[−]
[src]
pub struct AddRemoveSet<T> { /* fields omitted */ }
Provides a simple set which has interior mutability. Removal is offered, but can fail at runtime if there is an active borrow. Removal leaves holes, and there is no way to reclaim that space.
Methods
impl<T> AddRemoveSet<T>
[src]
fn with_capacity(slots: usize) -> AddRemoveSet<T>
fn add(&self, value: T) -> Ref<T>
fn add_mut(&self, value: T) -> RefMut<T>
fn iter(&self) -> IterAddRemoveSet<T>
fn iter_mut(&self) -> IterMutAddRemoveSet<T>
Ok(None) means it definitely doesn't exist in the set Err() means we couldn't access all the items in
fn mut_clear(&mut self)
fn clear(&self) -> Result<(), BorrowMutError>
fn try_remove(&self, v: *const T) -> Result<bool, BorrowMutError>
Ok(true) - removed. Ok(false) - certainly didn't exist. Err() - either borrowed or didn't exist (unknowable)
fn try_contains(&self, v: *const T) -> Result<bool, BorrowError>
fn try_get_reference(&self, v: *const T) -> Result<Option<Ref<T>>, BorrowError>
fn try_get_reference_mut(&self,
v: *const T)
-> Result<Option<RefMut<T>>, BorrowMutError>
v: *const T)
-> Result<Option<RefMut<T>>, BorrowMutError>
Trait Implementations
impl<T: Debug> Debug for AddRemoveSet<T>
[src]
impl<T: Clone> Clone for AddRemoveSet<T>
[src]
fn clone(&self) -> AddRemoveSet<T>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl<T: PartialEq> PartialEq for AddRemoveSet<T>
[src]
fn eq(&self, __arg_0: &AddRemoveSet<T>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &AddRemoveSet<T>) -> bool
This method tests for !=
.