Struct growable::Reusable[][src]

pub struct Reusable<T: ?Sized> { /* fields omitted */ }

A reusable box. It behaves just like the default Box (and it WILL free memory on drop) but it is also possible to free it manually, fetching a Growable back.

Implementations

impl<T: ?Sized> Reusable<T>[src]

pub fn free(this: Self) -> Growable[src]

Drops the value and returns the memory back as a Growable.

pub fn free_move(this: Self) -> (T, Growable) where
    T: Sized
[src]

Moves the value out of this Reusable without dropping it and then returns it back with Growable.

Trait Implementations

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

impl<T: ?Sized, U> CoerceUnsized<Reusable<U>> for Reusable<T> where
    T: Unsize<U>,
    U: ?Sized
[src]

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

impl<T: ?Sized> Deref for Reusable<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T: ?Sized> DerefMut for Reusable<T>[src]

impl<T: ?Sized> Drop for Reusable<T>[src]

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

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

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

Auto Trait Implementations

impl<T: ?Sized> RefUnwindSafe for Reusable<T> where
    T: RefUnwindSafe

impl<T: ?Sized> Unpin for Reusable<T>

impl<T: ?Sized> UnwindSafe for Reusable<T> where
    T: RefUnwindSafe

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, 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.