[][src]Struct mongodb::ClientOptions

pub struct ClientOptions {
    pub log_file: Option<String>,
    pub read_preference: Option<ReadPreference>,
    pub write_concern: Option<WriteConcern>,
    pub heartbeat_frequency_ms: u32,
    pub server_selection_timeout_ms: i64,
    pub local_threshold_ms: i64,
    pub stream_connector: StreamConnector,
}

Configuration options for a client.

Fields

log_file: Option<String>

File path for command logging.

read_preference: Option<ReadPreference>

Client-level server selection preferences for read operations.

write_concern: Option<WriteConcern>

Client-level write guarantees when reporting a write success.

heartbeat_frequency_ms: u32

Frequency of server monitor updates; default 10000 ms.

server_selection_timeout_ms: i64

Timeout for selecting an appropriate server for operations; default 30000 ms.

local_threshold_ms: i64

The size of the latency window for selecting suitable servers; default 15 ms.

stream_connector: StreamConnector

Options for how to connect to the server.

Methods

impl ClientOptions[src]

pub fn new() -> ClientOptions[src]

Creates a new default options struct.

pub fn with_log_file(file: &str) -> ClientOptions[src]

Creates a new options struct with a specified log file.

Trait Implementations

impl Default for ClientOptions[src]

Auto Trait Implementations

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> Same<T> for T

type Output = T

Should always be Self