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]
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]
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]
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]
impl<'a, T> Display for RcRecycled<T> where T: Display + Recycleable
[src]
impl<'a, T> Deref for RcRecycled<T> where T: Recycleable
[src]
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]
fn deref_mut(&mut self) -> &mut T
The method called to mutably dereference a value