Enum relay_redis::RedisConfig
source · pub enum RedisConfig {
Cluster {
cluster_nodes: Vec<String>,
options: RedisConfigOptions,
},
Single(String),
SingleWithOpts {
server: String,
options: RedisConfigOptions,
},
}
Expand description
Configuration for connecting a redis client.
Variants§
Cluster
Fields
§
cluster_nodes: Vec<String>
List of redis://
urls to use in cluster mode.
This can also be a single node which is configured in cluster mode.
§
options: RedisConfigOptions
Additional configuration options for the redis client and a connections pool.
Connect to a Redis cluster.
Single(String)
Connect to a single Redis instance.
Contains the redis://
url to the node.
SingleWithOpts
Fields
§
options: RedisConfigOptions
Additional configuration options for the redis client and a connections pool.
Connect to a single Redis instance.
Allows to provide more configuration options, e.g. max_connections
.
Trait Implementations§
source§impl Clone for RedisConfig
impl Clone for RedisConfig
source§fn clone(&self) -> RedisConfig
fn clone(&self) -> RedisConfig
Returns a copy 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 moresource§impl Debug for RedisConfig
impl Debug for RedisConfig
source§impl<'de> Deserialize<'de> for RedisConfig
impl<'de> Deserialize<'de> for RedisConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for RedisConfig
impl PartialEq for RedisConfig
source§fn eq(&self, other: &RedisConfig) -> bool
fn eq(&self, other: &RedisConfig) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for RedisConfig
impl Serialize for RedisConfig
impl Eq for RedisConfig
impl StructuralPartialEq for RedisConfig
Auto Trait Implementations§
impl RefUnwindSafe for RedisConfig
impl Send for RedisConfig
impl Sync for RedisConfig
impl Unpin for RedisConfig
impl UnwindSafe for RedisConfig
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