Struct fred::types::ReplicaConfig
source · pub struct ReplicaConfig {
pub lazy_connections: bool,
pub filter: Option<Rc<dyn ReplicaFilter>>,
pub ignore_reconnection_errors: bool,
pub connection_error_count: u32,
pub primary_fallback: bool,
}Available on crate feature
replicas only.Expand description
Configuration options for replica node connections.
Fields§
§lazy_connections: boolWhether the client should lazily connect to replica nodes.
Default: true
filter: Option<Rc<dyn ReplicaFilter>>An optional interface for filtering available replica nodes.
Default: None
ignore_reconnection_errors: boolWhether the client should ignore errors from replicas that occur when the max reconnection count is reached.
Default: true
connection_error_count: u32The number of times a command can fail with a replica connection error before being sent to a primary node.
Default: 0 (unlimited)
primary_fallback: boolWhether the client should use the associated primary node if no replica exists that can serve a command.
Default: true
Trait Implementations§
source§impl Clone for ReplicaConfig
impl Clone for ReplicaConfig
source§fn clone(&self) -> ReplicaConfig
fn clone(&self) -> ReplicaConfig
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 ReplicaConfig
impl Debug for ReplicaConfig
source§impl Default for ReplicaConfig
impl Default for ReplicaConfig
source§impl PartialEq for ReplicaConfig
impl PartialEq for ReplicaConfig
impl Eq for ReplicaConfig
Auto Trait Implementations§
impl Freeze for ReplicaConfig
impl !RefUnwindSafe for ReplicaConfig
impl !Send for ReplicaConfig
impl !Sync for ReplicaConfig
impl Unpin for ReplicaConfig
impl !UnwindSafe for ReplicaConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more