pub struct PooledInstance<T, E>{ /* private fields */ }Expand description
RAII wrapper acquired from an InstancePool: holds the instance
and returns it to the pool on drop.
Adapters use this to make “acquire-call-release” exception-safe — if the plugin call panics, the instance still returns home (drop runs).
Implementations§
Trait Implementations§
Source§impl<T, E> Debug for PooledInstance<T, E>
impl<T, E> Debug for PooledInstance<T, E>
Source§impl<T, E> Drop for PooledInstance<T, E>
impl<T, E> Drop for PooledInstance<T, E>
Auto Trait Implementations§
impl<T, E> !RefUnwindSafe for PooledInstance<T, E>
impl<T, E> !UnwindSafe for PooledInstance<T, E>
impl<T, E> Freeze for PooledInstance<T, E>where
T: Freeze,
impl<T, E> Send for PooledInstance<T, E>
impl<T, E> Sync for PooledInstance<T, E>where
T: Sync,
impl<T, E> Unpin for PooledInstance<T, E>where
T: Unpin,
impl<T, E> UnsafeUnpin for PooledInstance<T, E>where
T: UnsafeUnpin,
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