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