pub struct LockedSentinelClient(/* private fields */);Available on crate features
sentinel and r2d2 only.Expand description
LockedSentinelClient is a wrapper around SentinelClient usable in r2d2.
Implementations§
Source§impl LockedSentinelClient
impl LockedSentinelClient
Sourcepub fn new(client: SentinelClient) -> Self
pub fn new(client: SentinelClient) -> Self
new creates a LockedSentinelClient by wrapping a new Mutex around the SentinelClient
Sourcepub fn get_connection(&self) -> RedisResult<Connection>
pub fn get_connection(&self) -> RedisResult<Connection>
get_connection is the override for LockedSentinelClient to make it possible to use LockedSentinelClient with r2d2 macro.
Trait Implementations§
Source§impl ManageConnection for LockedSentinelClient
impl ManageConnection for LockedSentinelClient
Source§type Connection = Connection
type Connection = Connection
The connection type this manager deals with.
Source§type Error = RedisError
type Error = RedisError
The error type returned by
Connections.Source§fn connect(&self) -> Result<Self::Connection, Self::Error>
fn connect(&self) -> Result<Self::Connection, Self::Error>
Attempts to create a new connection.
Source§fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error>
fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error>
Determines if the connection is still connected to the database. Read more
Source§fn has_broken(&self, conn: &mut Self::Connection) -> bool
fn has_broken(&self, conn: &mut Self::Connection) -> bool
Quickly determines if the connection is no longer usable. Read more
Auto Trait Implementations§
impl !Freeze for LockedSentinelClient
impl RefUnwindSafe for LockedSentinelClient
impl Send for LockedSentinelClient
impl Sync for LockedSentinelClient
impl Unpin for LockedSentinelClient
impl UnwindSafe for LockedSentinelClient
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