[][src]Struct lifeguard::RcRecycled

pub struct RcRecycled<T> where
    T: Recycleable
{ /* fields omitted */ }

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

Implementations

impl<'a, T> RcRecycled<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 RcRecycled<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 RcRecycled<T> where
    T: Recycleable
[src]

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

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

impl<T> Clone for RcRecycled<T> where
    T: Clone + Recycleable
[src]

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

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

type Target = T

The resulting type after dereferencing.

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

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

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

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

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

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

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

Auto Trait Implementations

impl<T> !RefUnwindSafe for RcRecycled<T>

impl<T> !Send for RcRecycled<T>

impl<T> !Sync for RcRecycled<T>

impl<T> Unpin for RcRecycled<T> where
    T: Unpin

impl<T> !UnwindSafe for RcRecycled<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.