pub trait PoolMut<A: ScalarAllocator> {
// Required methods
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>;
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>;
}Expand description
A pool of ids that can be used to reuse ids in Dynamic.
Required Methods§
Sourcefn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
Put a new id into the pool
Sourcefn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Take an id out of the pool
Implementations on Foreign Types§
Source§impl<A: ScalarAllocator> PoolMut<A> for Option<OpaqueScalar<A>>
impl<A: ScalarAllocator> PoolMut<A> for Option<OpaqueScalar<A>>
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<A: ScalarAllocator> PoolMut<A> for ()
impl<A: ScalarAllocator> PoolMut<A> for ()
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<A: ScalarAllocator> PoolMut<A> for BinaryHeap<OpaqueScalar<A>>
impl<A: ScalarAllocator> PoolMut<A> for BinaryHeap<OpaqueScalar<A>>
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<A: ScalarAllocator> PoolMut<A> for VecDeque<OpaqueScalar<A>>
impl<A: ScalarAllocator> PoolMut<A> for VecDeque<OpaqueScalar<A>>
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<A: ScalarAllocator> PoolMut<A> for Vec<OpaqueScalar<A>>
impl<A: ScalarAllocator> PoolMut<A> for Vec<OpaqueScalar<A>>
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<A: ScalarAllocator, P: Pool<A>, F: FnOnce() -> P> PoolMut<A> for Lazy<P, F>
Available on crate feature once_cell only.
impl<A: ScalarAllocator, P: Pool<A>, F: FnOnce() -> P> PoolMut<A> for Lazy<P, F>
Available on crate feature
once_cell only.fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<A: ScalarAllocator, P: Pool<A>, F: FnOnce() -> P> PoolMut<A> for Lazy<P, F>
Available on crate feature once_cell only.
impl<A: ScalarAllocator, P: Pool<A>, F: FnOnce() -> P> PoolMut<A> for Lazy<P, F>
Available on crate feature
once_cell only.fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<A: ScalarAllocator, P: PoolMut<A>> PoolMut<A> for Mutex<P>
Available on crate feature std only.
impl<A: ScalarAllocator, P: PoolMut<A>> PoolMut<A> for Mutex<P>
Available on crate feature
std only.fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<A: ScalarAllocator, P: PoolMut<A>> PoolMut<A> for Mutex<P>
Available on crate feature parking_lot only.
impl<A: ScalarAllocator, P: PoolMut<A>> PoolMut<A> for Mutex<P>
Available on crate feature
parking_lot only.fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<A: ScalarAllocator, T: ?Sized + PoolMut<A>> PoolMut<A> for Cell<T>
impl<A: ScalarAllocator, T: ?Sized + PoolMut<A>> PoolMut<A> for Cell<T>
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<A: ScalarAllocator, T: ?Sized + PoolMut<A>> PoolMut<A> for RefCell<T>
impl<A: ScalarAllocator, T: ?Sized + PoolMut<A>> PoolMut<A> for RefCell<T>
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<P: ?Sized + Pool<A>, A: ScalarAllocator> PoolMut<A> for &P
impl<P: ?Sized + Pool<A>, A: ScalarAllocator> PoolMut<A> for &P
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Source§impl<P: ?Sized + PoolMut<A>, A: ScalarAllocator> PoolMut<A> for &mut P
impl<P: ?Sized + PoolMut<A>, A: ScalarAllocator> PoolMut<A> for &mut P
fn insert_mut(&mut self, scalar: OpaqueScalar<A>) -> Option<OpaqueScalar<A>>
fn remove_mut(&mut self) -> Option<OpaqueScalar<A>>
Implementors§
impl<A: ScalarAllocator> PoolMut<A> for SyncQueuePool<A>
Available on crate features
parking_lot or std only.impl<A: ScalarAllocator> PoolMut<A> for SyncStackPool<A>
Available on crate features
parking_lot or std only.