Struct bb8_redis::RedisConnectionManager
source · [−]pub struct RedisConnectionManager { /* private fields */ }
Expand description
A bb8::ManageConnection
for redis::Client::get_async_connection
.
Implementations
sourceimpl RedisConnectionManager
impl RedisConnectionManager
sourcepub fn new<T: IntoConnectionInfo>(
info: T
) -> Result<RedisConnectionManager, RedisError>
pub fn new<T: IntoConnectionInfo>(
info: T
) -> Result<RedisConnectionManager, RedisError>
Create a new RedisConnectionManager
.
See redis::Client::open
for a description of the parameter types.
Trait Implementations
sourceimpl Clone for RedisConnectionManager
impl Clone for RedisConnectionManager
sourcefn clone(&self) -> RedisConnectionManager
fn clone(&self) -> RedisConnectionManager
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for RedisConnectionManager
impl Debug for RedisConnectionManager
sourceimpl ManageConnection for RedisConnectionManager
impl ManageConnection for RedisConnectionManager
type Connection = Connection<Pin<Box<dyn AsyncStream + Sync + Send + 'static, Global>>>
type Connection = Connection<Pin<Box<dyn AsyncStream + Sync + Send + 'static, Global>>>
The connection type this manager deals with.
type Error = RedisError
type Error = RedisError
The error type returned by
Connection
s.sourcefn connect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Attempts to create a new connection.
sourcefn is_valid<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Connection
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn is_valid<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Connection
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Determines if the connection is still connected to the database.
sourcefn has_broken(&self, _: &mut Self::Connection) -> bool
fn has_broken(&self, _: &mut Self::Connection) -> bool
Synchronously determine if the connection is no longer usable, if possible.
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more