[−]Trait redis_actor::bb8_redis::bb8::ManageConnection
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 Connection
s.
Required methods
#[must_use]pub fn connect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
Self: 'async_trait,
Attempts to create a new connection.
#[must_use]pub fn is_valid<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conn: &'life1 mut PooledConnection<'life2, Self>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
&'life0 self,
conn: &'life1 mut PooledConnection<'life2, Self>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait,
Determines if the connection is still connected to the database.
pub fn has_broken(&self, conn: &mut Self::Connection) -> bool
Synchronously determine if the connection is no longer usable, if possible.
Implementors
impl ManageConnection for RedisConnectionManager
[src]
type Connection = Connection<Pin<Box<dyn AsyncStream + 'static + Sync + Send, Global>>>
type Error = RedisError
pub fn connect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<<RedisConnectionManager as ManageConnection>::Connection, <RedisConnectionManager as ManageConnection>::Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
RedisConnectionManager: 'async_trait,
[src]
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<<RedisConnectionManager as ManageConnection>::Connection, <RedisConnectionManager as ManageConnection>::Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
RedisConnectionManager: 'async_trait,
pub fn is_valid<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conn: &'life1 mut PooledConnection<'life2, RedisConnectionManager>
) -> Pin<Box<dyn Future<Output = Result<(), <RedisConnectionManager as ManageConnection>::Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
RedisConnectionManager: 'async_trait,
[src]
&'life0 self,
conn: &'life1 mut PooledConnection<'life2, RedisConnectionManager>
) -> Pin<Box<dyn Future<Output = Result<(), <RedisConnectionManager as ManageConnection>::Error>> + 'async_trait + Send, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
RedisConnectionManager: 'async_trait,
pub fn has_broken(
&self,
&mut <RedisConnectionManager as ManageConnection>::Connection
) -> bool
[src]
&self,
&mut <RedisConnectionManager as ManageConnection>::Connection
) -> bool