[]Trait redis_actor::bb8_redis::bb8::ManageConnection

pub trait ManageConnection: 'static + Send + Sync {
    type Connection: 'static + Send;
    type Error: 'static + Send + Debug;
#[must_use]    fn connect<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
#[must_use] fn is_valid<'life0, 'async_trait>(
        &'life0 self,
        conn: Self::Connection
    ) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + 'async_trait + Send>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
;
fn has_broken(&self, conn: &mut Self::Connection) -> bool; }

A trait which provides connection-specific functionality.

Associated Types

type Connection: 'static + Send

The connection type this manager deals with.

type Error: 'static + Send + Debug

The error type returned by Connections.

Loading content...

Required methods

#[must_use]fn connect<'life0, 'async_trait>(
    &'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Attempts to create a new connection.

#[must_use]fn is_valid<'life0, 'async_trait>(
    &'life0 self,
    conn: Self::Connection
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + 'async_trait + Send>> where
    'life0: 'async_trait,
    Self: 'async_trait, 

Determines if the connection is still connected to the database.

fn has_broken(&self, conn: &mut Self::Connection) -> bool

Synchronously determine if the connection is no longer usable, if possible.

Loading content...

Implementors

impl ManageConnection for RedisConnectionManager[src]

type Connection = Option<Connection>

type Error = RedisError

Loading content...