Struct lifeguard::Recycled [] [src]

pub struct Recycled<'a, T: 'a> where
    T: Recycleable
{ /* fields omitted */ }

A smartpointer which uses a shared reference (&) to know when to move its wrapped value back to the Pool that issued it.

Methods

impl<'a, T> Recycled<'a, T> where
    T: Recycleable
[src]

Disassociates the value from the Pool that issued it. This destroys the smartpointer and returns the previously wrapped value.

Trait Implementations

impl<'a, T> AsRef<T> for Recycled<'a, T> where
    T: Recycleable
[src]

Gets a shared reference to the value wrapped by the smartpointer.

impl<'a, T> AsMut<T> for Recycled<'a, T> where
    T: Recycleable
[src]

Gets a mutable reference to the value wrapped by the smartpointer.

impl<'a, T> Debug for Recycled<'a, T> where
    T: Debug + Recycleable
[src]

Formats the value using the given formatter.

impl<'a, T> Display for Recycled<'a, T> where
    T: Display + Recycleable
[src]

Formats the value using the given formatter. Read more

impl<'a, T> Deref for Recycled<'a, T> where
    T: Recycleable
[src]

The resulting type after dereferencing

The method called to dereference a value

impl<'a, T> DerefMut for Recycled<'a, T> where
    T: Recycleable
[src]

The method called to mutably dereference a value