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]

[src]

Returns the "default value" for a type. Read more

impl<T: Debug + Default> Debug for ConcurrentPoolObjectHandler<T>
[src]

[src]

Formats the value using the given formatter.

impl<T: Default> Deref for ConcurrentPoolObjectHandler<T>
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.

impl<T: Default + Eq> Eq for ConcurrentPoolObjectHandler<T>
[src]

impl<T: Default + PartialEq> PartialEq for ConcurrentPoolObjectHandler<T>
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl<T: Default> Drop for ConcurrentPoolObjectHandler<T>
[src]

[src]

Executes the destructor for this type. Read more

impl<T: Default> Clone for ConcurrentPoolObjectHandler<T>
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more