pub struct ParObjPool<T, const S: usize> { /* private fields */ }Implementations§
Source§impl<T, const S: usize> ParObjPool<T, S>
impl<T, const S: usize> ParObjPool<T, S>
pub fn new() -> Self
pub fn insert(&self, object: T) -> ObjId
pub fn remove(&self, obj_id: ObjId) -> Option<T>
pub fn get(&self, obj_id: ObjId) -> Option<MappedRwLockReadGuard<'_, T>>
pub fn try_get(&self, obj_id: ObjId) -> Option<MappedRwLockReadGuard<'_, T>>
pub fn get_mut(&self, obj_id: ObjId) -> Option<MappedRwLockWriteGuard<'_, T>>
pub fn try_get_mut( &self, obj_id: ObjId, ) -> Option<MappedRwLockWriteGuard<'_, T>>
pub fn clear(&self)
pub fn shrink_to_fit(&self)
pub fn capacity(&self) -> usize
Auto Trait Implementations§
impl<T, const S: usize> !Freeze for ParObjPool<T, S>
impl<T, const S: usize> !RefUnwindSafe for ParObjPool<T, S>
impl<T, const S: usize> Send for ParObjPool<T, S>where
T: Send,
impl<T, const S: usize> Sync for ParObjPool<T, S>
impl<T, const S: usize> Unpin for ParObjPool<T, S>where
T: Unpin,
impl<T, const S: usize> UnwindSafe for ParObjPool<T, S>where
T: 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