pub struct Pooled<T> { /* private fields */ }Expand description
RAII guard that returns the object to the pool on drop.
This guard can be sent to other threads. When dropped, the object
is automatically returned to the pool’s storage. If the pool was
already dropped, the value goes back into the orphaned Inner,
which finally dies (along with every in-pool value) when the last
Pooled exits. See docs/caveats.md §2.
Trait Implementations§
impl<T: Send> Send for Pooled<T>
impl<T: Send + Sync> Sync for Pooled<T>
Auto Trait Implementations§
impl<T> Freeze for Pooled<T>where
T: Freeze,
impl<T> !RefUnwindSafe for Pooled<T>
impl<T> Unpin for Pooled<T>where
T: Unpin,
impl<T> UnsafeUnpin for Pooled<T>where
T: UnsafeUnpin,
impl<T> !UnwindSafe for Pooled<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