pub struct SingleConfig { /* private fields */ }Expand description
Configuration for a single Redis node connection.
§When You’ll Encounter This
You typically don’t create this directly. It appears when:
- Using
ConnectionMode::singlewhich creates this internally - Accessing configuration for debugging or logging
§Examples
use hitbox_redis::SingleConfig;
let config = SingleConfig::new("redis://localhost:6379/");Implementations§
Source§impl SingleConfig
impl SingleConfig
Sourcepub fn new(url: impl Into<String>) -> Self
pub fn new(url: impl Into<String>) -> Self
Creates a new single-node configuration.
§Arguments
url- Redis connection URL in formatredis://[:<password>@]<host>[:<port>][/<database>]
§Default
exponent_base:2.0(exponential backoff base for retries)
§Examples
use hitbox_redis::SingleConfig;
let config = SingleConfig::new("redis://localhost:6379/0");Trait Implementations§
Source§impl Clone for SingleConfig
impl Clone for SingleConfig
Source§fn clone(&self) -> SingleConfig
fn clone(&self) -> SingleConfig
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for SingleConfig
impl RefUnwindSafe for SingleConfig
impl Send for SingleConfig
impl Sync for SingleConfig
impl Unpin for SingleConfig
impl UnwindSafe for SingleConfig
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