pub enum RedisConnection {
    Single(Rc<RefCell<ConnectionManager>>),
    Cluster(Rc<RefCell<ClusterConnection>>),
}Expand description
Redis connection - manages both single and clustered deployments
Variants§
Single(Rc<RefCell<ConnectionManager>>)
Cluster(Rc<RefCell<ClusterConnection>>)
Implementations§
Source§impl RedisConnection
 
impl RedisConnection
Sourcepub fn get_client(&self) -> Self
 
pub fn get_client(&self) -> Self
Get client. Uses interior mutability, so lookout for panics
Sourcepub async fn exec<T: FromRedisValue>(&self, cmd: &mut Cmd) -> RedisResult<T>
 
pub async fn exec<T: FromRedisValue>(&self, cmd: &mut Cmd) -> RedisResult<T>
execute a redis command against a Self
pub async fn ping(&self) -> bool
Trait Implementations§
Source§impl Clone for RedisConnection
 
impl Clone for RedisConnection
Source§fn clone(&self) -> RedisConnection
 
fn clone(&self) -> RedisConnection
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for RedisConnection
impl !RefUnwindSafe for RedisConnection
impl !Send for RedisConnection
impl !Sync for RedisConnection
impl Unpin for RedisConnection
impl !UnwindSafe for RedisConnection
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