pub struct RedisConnectionManager { /* private fields */ }
Expand description
A bb8::ManageConnection
for redis::Client::get_async_connection
.
Implementations§
Source§impl RedisConnectionManager
impl RedisConnectionManager
Sourcepub fn new<T>(info: T) -> Result<RedisConnectionManager, RedisError>where
T: IntoConnectionInfo,
pub fn new<T>(info: T) -> Result<RedisConnectionManager, RedisError>where
T: IntoConnectionInfo,
Create a new RedisConnectionManager
.
See redis::Client::open
for a description of the parameter types.
Trait Implementations§
Source§impl Clone for RedisConnectionManager
impl Clone for RedisConnectionManager
Source§fn clone(&self) -> RedisConnectionManager
fn clone(&self) -> RedisConnectionManager
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for RedisConnectionManager
impl Debug for RedisConnectionManager
Source§impl ManageConnection for RedisConnectionManager
impl ManageConnection for RedisConnectionManager
Source§type Connection = MultiplexedConnection
type Connection = MultiplexedConnection
The connection type this manager deals with.
Source§type Error = RedisError
type Error = RedisError
The error type returned by
Connection
s.Source§async fn connect(
&self,
) -> Result<<RedisConnectionManager as ManageConnection>::Connection, <RedisConnectionManager as ManageConnection>::Error>
async fn connect( &self, ) -> Result<<RedisConnectionManager as ManageConnection>::Connection, <RedisConnectionManager as ManageConnection>::Error>
Attempts to create a new connection.
Source§async fn is_valid(
&self,
conn: &mut <RedisConnectionManager as ManageConnection>::Connection,
) -> Result<(), <RedisConnectionManager as ManageConnection>::Error>
async fn is_valid( &self, conn: &mut <RedisConnectionManager as ManageConnection>::Connection, ) -> Result<(), <RedisConnectionManager as ManageConnection>::Error>
Determines if the connection is still connected to the database.
Source§fn has_broken(
&self,
_: &mut <RedisConnectionManager as ManageConnection>::Connection,
) -> bool
fn has_broken( &self, _: &mut <RedisConnectionManager as ManageConnection>::Connection, ) -> bool
Synchronously determine if the connection is no longer usable, if possible.
Auto Trait Implementations§
impl Freeze for RedisConnectionManager
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more