Struct redis::cluster::ClusterClientBuilder[][src]

pub struct ClusterClientBuilder { /* fields omitted */ }
This is supported on crate feature cluster only.
Expand description

Used to configure and build a ClusterClient.

Implementations

impl ClusterClientBuilder[src]

pub fn new<T: IntoConnectionInfo>(initial_nodes: Vec<T>) -> ClusterClientBuilder[src]

Generate the base configuration for new Client.

pub fn open(self) -> RedisResult<ClusterClient>[src]

Builds a ClusterClient. Despite the name, this does not actually open a connection to Redis Cluster, but will perform some basic checks of the initial nodes’ URLs and passwords.

Errors

Upon failure to parse initial nodes or if the initial nodes have different passwords, an error is returned.

pub fn password(self, password: String) -> ClusterClientBuilder[src]

Set password for new ClusterClient.

pub fn readonly(self, readonly: bool) -> ClusterClientBuilder[src]

Set read only mode for new ClusterClient (default is false). If readonly is true, all queries will go to replica nodes. If there are no replica nodes, queries will be issued to the primary nodes.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V