pub struct Object<M: Manager> { /* private fields */ }
Available on crate feature
managed
only.Expand description
Wrapper around the actual pooled object which implements Deref
,
DerefMut
and Drop
traits.
Use this object just as if it was of type T
and upon leaving a scope the
Drop::drop()
will take care of returning it to the pool.
Implementations
Trait Implementations
Auto Trait Implementations
impl<M> !RefUnwindSafe for Object<M>
impl<M> Send for Object<M> where
<M as Manager>::Type: Send,
impl<M> Sync for Object<M> where
<M as Manager>::Type: Send + Sync,
impl<M> Unpin for Object<M> where
<M as Manager>::Type: Unpin,
impl<M> !UnwindSafe for Object<M>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more