Struct deadpool::managed::Object[][src]

pub struct Object<M: Manager> { /* fields omitted */ }
This is supported on crate feature managed only.
Expand description

Wrapper around the actual pooled object which implements Deref, DerefMut and Drop traits.

Use this object just as if it was of type T and upon leaving a scope the Drop::drop() will take care of returning it to the pool.

Implementations

Takes this Object from its Pool permanently. This reduces the size of the Pool.

Get object statistics

Returns the Pool this Object belongs to.

Since Objects only hold a Weak reference to the Pool they come from, this can fail and return None instead.

Trait Implementations

Performs the conversion.

Performs the conversion.

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.