#[non_exhaustive]pub struct KvOptions {
pub enable_mutation_tokens: Option<bool>,
pub enable_server_durations: Option<bool>,
pub num_connections: Option<usize>,
pub connect_timeout: Option<Duration>,
pub connect_throttle_timeout: Option<Duration>,
}Expand description
Configuration for key-value (memcached protocol) connections.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.enable_mutation_tokens: Option<bool>Whether to request mutation tokens from the server. Mutation tokens are required
for MutationState-based query consistency.
enable_server_durations: Option<bool>Whether to request server-side operation duration metrics.
num_connections: Option<usize>The number of KV connections to open per node.
connect_timeout: Option<Duration>Timeout for establishing a single KV connection.
connect_throttle_timeout: Option<Duration>Throttle timeout applied when many connections are being opened concurrently.
Implementations§
Source§impl KvOptions
impl KvOptions
Sourcepub fn enable_mutation_tokens(self, enable: bool) -> Self
pub fn enable_mutation_tokens(self, enable: bool) -> Self
Enables or disables mutation tokens.
Mutation tokens are required for
MutationState-based query consistency.
Sourcepub fn enable_server_durations(self, enable: bool) -> Self
pub fn enable_server_durations(self, enable: bool) -> Self
Enables or disables server-side operation duration metrics.
Sourcepub fn num_connections(self, num: usize) -> Self
pub fn num_connections(self, num: usize) -> Self
Sets the number of KV connections to open per node.
Sourcepub fn connect_timeout(self, timeout: Duration) -> Self
pub fn connect_timeout(self, timeout: Duration) -> Self
Sets the timeout for establishing a single KV connection.
Sourcepub fn connect_throttle_timeout(self, timeout: Duration) -> Self
pub fn connect_throttle_timeout(self, timeout: Duration) -> Self
Sets the throttle timeout for concurrent connection establishment.
Trait Implementations§
impl StructuralPartialEq for KvOptions
Auto Trait Implementations§
impl Freeze for KvOptions
impl RefUnwindSafe for KvOptions
impl Send for KvOptions
impl Sync for KvOptions
impl Unpin for KvOptions
impl UnsafeUnpin for KvOptions
impl UnwindSafe for KvOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.