Struct mobc_redis_cluster::Client [−][src]
pub struct Client { /* fields omitted */ }
Expand description
This is a Redis cluster client.
Implementations
impl Client
[src]
impl Client
[src]pub fn open<T>(initial_nodes: Vec<T, Global>) -> Result<Client, RedisError> where
T: IntoConnectionInfo,
[src]
pub fn open<T>(initial_nodes: Vec<T, Global>) -> Result<Client, RedisError> where
T: IntoConnectionInfo,
[src]Connect to a redis cluster server and return a cluster client. This does not actually open a connection yet but it performs some basic checks on the URL.
Errors
If it is failed to parse initial_nodes, an error is returned.
pub fn set_retries(&mut self, retries: Option<u32>) -> &mut Client
[src]
pub fn set_retries(&mut self, retries: Option<u32>) -> &mut Client
[src]Set how many times we should retry a query. Set None
to retry forever.
Default: 16
pub async fn get_connection(
&'_ self
) -> Result<Connection<MultiplexedConnection>, RedisError>
[src]
pub async fn get_connection(
&'_ self
) -> Result<Connection<MultiplexedConnection>, RedisError>
[src]Open and get a Redis cluster connection.
Errors
If it is failed to open connections and to create slots, an error is returned.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl UnwindSafe for Client
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,