Struct lifeguard::RcRecycled
[−]
[src]
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.
Methods
impl<'a, T> RcRecycled<T> where
T: Recycleable,
[src]
T: Recycleable,
fn detach(self) -> T
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 RcRecycled<T> where
T: Recycleable,
[src]
T: Recycleable,
fn as_ref(&self) -> &T
Gets a shared reference to the value wrapped by the smartpointer.
impl<'a, T> AsMut<T> for RcRecycled<T> where
T: Recycleable,
[src]
T: Recycleable,
fn as_mut(&mut self) -> &mut T
Gets a mutable reference to the value wrapped by the smartpointer.
impl<'a, T> Debug for RcRecycled<T> where
T: Debug + Recycleable,
[src]
T: Debug + Recycleable,
impl<'a, T> Display for RcRecycled<T> where
T: Display + Recycleable,
[src]
T: Display + Recycleable,
impl<'a, T> Deref for RcRecycled<T> where
T: Recycleable,
[src]
T: Recycleable,
type Target = T
The resulting type after dereferencing
fn deref(&self) -> &T
The method called to dereference a value
impl<'a, T> DerefMut for RcRecycled<T> where
T: Recycleable,
[src]
T: Recycleable,
fn deref_mut(&mut self) -> &mut T
The method called to mutably dereference a value