pub struct RedisConfig { /* private fields */ }Expand description
Redis connection and namespace settings.
Implementations§
Source§impl RedisConfig
impl RedisConfig
Sourcepub fn new(url: impl Into<String>) -> Self
pub fn new(url: impl Into<String>) -> Self
Creates a new Redis configuration using the default namespace and index.
Sourcepub fn with_namespace(self, namespace: impl Into<String>) -> Self
pub fn with_namespace(self, namespace: impl Into<String>) -> Self
Sets the namespace prefix used for generated Redis keys.
Sourcepub fn with_index(self, index: impl Into<String>) -> Self
pub fn with_index(self, index: impl Into<String>) -> Self
Sets the Redis index name.
Trait Implementations§
Source§impl Clone for RedisConfig
impl Clone for RedisConfig
Source§fn clone(&self) -> RedisConfig
fn clone(&self) -> RedisConfig
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 moreSource§impl Debug for RedisConfig
impl Debug for RedisConfig
impl Eq for RedisConfig
Source§impl PartialEq for RedisConfig
impl PartialEq for RedisConfig
Source§fn eq(&self, other: &RedisConfig) -> bool
fn eq(&self, other: &RedisConfig) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for RedisConfig
Auto Trait Implementations§
impl Freeze for RedisConfig
impl RefUnwindSafe for RedisConfig
impl Send for RedisConfig
impl Sync for RedisConfig
impl Unpin for RedisConfig
impl UnsafeUnpin 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