Struct maskerad_object_pool::AtomicHandler
[−]
[src]
pub struct AtomicHandler<T: Default>(pub Arc<Mutex<PoolObject<T>>>);
A wrapper around a atomic reference-counted pointer to a PoolObject wrapped by a Mutex.
The poolObject is wrapped by a Mutex, to be able to mutate the PoolObject through multiple threads.
This Mutex is wrapped by an Arc, an atomic reference-counted pointer, so it is safe to send it to multiple threads.
This wrapper allow a custom drop implementation: when an AtomicHandler is dropped, the contained PoolObject is reinitialized to a default non-used state.
Methods from Deref<Target = Arc<Mutex<PoolObject<T>>>>
Trait Implementations
impl<T: Default + Default> Default for ConcurrentPoolObjectHandler<T>
[src]
fn default() -> ConcurrentPoolObjectHandler<T>
[src]
Returns the "default value" for a type. Read more
impl<T: Debug + Default> Debug for ConcurrentPoolObjectHandler<T>
[src]
impl<T: Default> Deref for ConcurrentPoolObjectHandler<T>
[src]
type Target = Arc<Mutex<PoolObject<T>>>
The resulting type after dereferencing.
fn deref(&self) -> &Arc<Mutex<PoolObject<T>>>
[src]
Dereferences the value.
impl<T: Default + Eq> Eq for ConcurrentPoolObjectHandler<T>
[src]
impl<T: Default + PartialEq> PartialEq for ConcurrentPoolObjectHandler<T>
[src]
fn eq(&self, other: &ConcurrentPoolObjectHandler<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
This method tests for !=
.
impl<T: Default> Drop for ConcurrentPoolObjectHandler<T>
[src]
impl<T: Default> Clone for ConcurrentPoolObjectHandler<T>
[src]
fn clone(&self) -> ConcurrentPoolObjectHandler<T>
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more