[][src]Struct lifeguard::Recycled

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.

Implementations

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

pub fn detach(self) -> T[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> AsMut<T> for Recycled<'a, T> where
    T: Recycleable
[src]

pub fn as_mut(&mut self) -> &mut T[src]

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

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

pub fn as_ref(&self) -> &T[src]

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

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

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

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

type Target = T

The resulting type after dereferencing.

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

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

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

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

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

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

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

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for Recycled<'a, T>

impl<'a, T> !Send for Recycled<'a, T>

impl<'a, T> !Sync for Recycled<'a, T>

impl<'a, T> Unpin for Recycled<'a, T> where
    T: Unpin

impl<'a, T> !UnwindSafe for Recycled<'a, T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.