pub struct LinearReusable<'a, T> { /* private fields */ }
Expand description
Wrapper over T used by LinearObjectPool
.
Access is allowed with std::ops::Deref
or std::ops::DerefMut
§Example
use lockfree_object_pool::LinearObjectPool;
let pool = LinearObjectPool::<u32>::new(
|| Default::default(),
|v| {
*v = 0;
}
);
let mut item = pool.pull();
*item = 5;
let work = *item * 5;
Trait Implementations§
Source§impl<'a, T> Deref for LinearReusable<'a, T>
impl<'a, T> Deref for LinearReusable<'a, T>
Source§impl<'a, T> DerefMut for LinearReusable<'a, T>
impl<'a, T> DerefMut for LinearReusable<'a, T>
Auto Trait Implementations§
impl<'a, T> Freeze for LinearReusable<'a, T>
impl<'a, T> !RefUnwindSafe for LinearReusable<'a, T>
impl<'a, T> Send for LinearReusable<'a, T>where
T: Sync,
impl<'a, T> Sync for LinearReusable<'a, T>where
T: Sync,
impl<'a, T> Unpin for LinearReusable<'a, T>
impl<'a, T> !UnwindSafe for LinearReusable<'a, T>
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