Trait diesel::r2d2::HandleEvent[][src]

pub trait HandleEvent: Debug + Sync + Send {
    pub fn handle_acquire(&self, event: AcquireEvent) { ... }
pub fn handle_release(&self, event: ReleaseEvent) { ... }
pub fn handle_checkout(&self, event: CheckoutEvent) { ... }
pub fn handle_timeout(&self, event: TimeoutEvent) { ... }
pub fn handle_checkin(&self, event: CheckinEvent) { ... } }

A trait which is provided with information about events in a connection pool.

Provided methods

pub fn handle_acquire(&self, event: AcquireEvent)[src]

Called when a new connection is acquired.

The default implementation does nothing.

pub fn handle_release(&self, event: ReleaseEvent)[src]

Called when a connection is released.

The default implementation does nothing.

pub fn handle_checkout(&self, event: CheckoutEvent)[src]

Called when a connection is checked out from the pool.

The default implementation does nothing.

pub fn handle_timeout(&self, event: TimeoutEvent)[src]

Called when a checkout attempt times out.

The default implementation does nothing.

pub fn handle_checkin(&self, event: CheckinEvent)[src]

Called when a connection is checked back into the pool.

Loading content...

Implementors

impl HandleEvent for NopEventHandler[src]

Loading content...