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.

Methods

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

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

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

Trait Implementations

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

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

The resulting type after dereferencing.

Dereferences the value.

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

Mutably dereferences the value.

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

Formats the value using the given formatter.

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

Formats the value using the given formatter. Read more

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

Executes the destructor for this type. Read more

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

Blanket Implementations

impl<T> From for T
[src]

Performs the conversion.

impl<T, U> Into for T where
    U: From<T>, 
[src]

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more