Struct mobc_redis::RedisConnectionManager
source · pub struct RedisConnectionManager { /* private fields */ }
Implementations§
Trait Implementations§
source§impl Manager for RedisConnectionManager
impl Manager for RedisConnectionManager
§type Connection = Connection
type Connection = Connection
The connection type this manager deals with.
§type Error = RedisError
type Error = RedisError
The error type returned by
Connection
s.source§fn connect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Attempts to create a new connection.
source§fn check<'life0, 'async_trait>(
&'life0 self,
conn: Self::Connection
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn check<'life0, 'async_trait>( &'life0 self, conn: Self::Connection ) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Determines if the connection is still connected to the database when check-out. Read more
source§fn spawn_task<T>(&self, task: T)where
T: Future + Send + 'static,
<T as Future>::Output: Send + 'static,
fn spawn_task<T>(&self, task: T)where T: Future + Send + 'static, <T as Future>::Output: Send + 'static,
Spawns a new asynchronous task.
source§fn validate(&self, _conn: &mut Self::Connection) -> bool
fn validate(&self, _conn: &mut Self::Connection) -> bool
Quickly determines a connection is still valid when check-in.
Auto Trait Implementations§
impl RefUnwindSafe for RedisConnectionManager
impl Send for RedisConnectionManager
impl Sync for RedisConnectionManager
impl Unpin for RedisConnectionManager
impl UnwindSafe for RedisConnectionManager
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more