pub struct RedisClient { /* private fields */ }Implementations§
Source§impl RedisClient
impl RedisClient
Sourcepub async fn conn(&self) -> Result<RedisClientConn, Error>
pub async fn conn(&self) -> Result<RedisClientConn, Error>
从连接池获取一个连接,单节点与集群模式均适用。
Sourcepub fn with_stat_callback(self, callback: &'static RedisCmdStatCallback) -> Self
pub fn with_stat_callback(self, callback: &'static RedisCmdStatCallback) -> Self
设置命令统计回调,支持链式调用。
Sourcepub fn is_cluster(&self) -> bool
pub fn is_cluster(&self) -> bool
是否为集群模式。
Trait Implementations§
Source§impl Clone for RedisClient
impl Clone for RedisClient
Source§fn clone(&self) -> RedisClient
fn clone(&self) -> RedisClient
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 RedisClient
impl !RefUnwindSafe for RedisClient
impl Send for RedisClient
impl Sync for RedisClient
impl Unpin for RedisClient
impl UnsafeUnpin for RedisClient
impl !UnwindSafe for RedisClient
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