deadpool_sqlite

Type Alias Object

Source
pub type Object = Object<Manager>;
Expand description

Type alias for using deadpool::managed::Object with rusqlite.

Aliased Type§

struct Object { /* private fields */ }

Implementations

Source§

impl<M> Object<M>
where M: Manager,

Source

pub fn take(this: Object<M>) -> <M as Manager>::Type

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

Source

pub fn metrics(this: &Object<M>) -> &Metrics

Get object statistics

Source

pub fn pool(this: &Object<M>) -> Option<Pool<M>>

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

Source§

impl<M> AsMut<<M as Manager>::Type> for Object<M>
where M: Manager,

Source§

fn as_mut(&mut self) -> &mut <M as Manager>::Type

Converts this type into a mutable reference of the (usually inferred) input type.
Source§

impl<M> AsRef<<M as Manager>::Type> for Object<M>
where M: Manager,

Source§

fn as_ref(&self) -> &<M as Manager>::Type

Converts this type into a shared reference of the (usually inferred) input type.
Source§

impl<M> Debug for Object<M>
where M: Debug + Manager, <M as Manager>::Type: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<M> Deref for Object<M>
where M: Manager,

Source§

type Target = <M as Manager>::Type

The resulting type after dereferencing.
Source§

fn deref(&self) -> &<M as Manager>::Type

Dereferences the value.
Source§

impl<M> DerefMut for Object<M>
where M: Manager,

Source§

fn deref_mut(&mut self) -> &mut <Object<M> as Deref>::Target

Mutably dereferences the value.
Source§

impl<M> Drop for Object<M>
where M: Manager,

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more