Struct ts_mem_pool::arc_recycled::ArcRecycled[][src]

pub struct ArcRecycled<T: Recycle> { /* fields omitted */ }

A smart pointer that returns memory to its owner when it is dropped

Methods

impl<T: Recycle> ArcRecycled<T>
[src]

Constructor function, takes the memory slot and the channel to the pool

Returns a reference to the content. Deref can be used instead

Returns a mutable reference to the content, if this is the only owner, if not returns None

Trait Implementations

impl<T: Debug + Recycle> Debug for ArcRecycled<T>
[src]

Formats the value using the given formatter. Read more

impl<T: Recycle> Clone for ArcRecycled<T>
[src]

Normal clone, but it is better explicited here.

Performs copy-assignment from source. Read more

impl<T: Recycle> Drop for ArcRecycled<T>
[src]

If strong_count is at 1, return data to owner

impl<T: Recycle> Deref for ArcRecycled<T>
[src]

The resulting type after dereferencing.

Give a reference directly to the innermost content

impl<T: Recycle> DerefMut for ArcRecycled<T>
[src]

Give a mutable reference directly to the innermost content

Panics

Dereferencing a shared pointer mutably will cause a panic. This trait should only be used for initialization. Any further change should be done with get_mut()

Auto Trait Implementations

impl<T> Send for ArcRecycled<T> where
    T: Send + Sync

impl<T> !Sync for ArcRecycled<T>