[][src]Struct mongodb_h2co3::topology::TopologyDescription

pub struct TopologyDescription {
    pub topology_type: TopologyType,
    pub set_name: String,
    pub servers: HashMap<Host, Server>,
    pub heartbeat_frequency_ms: u32,
    pub local_threshold_ms: i64,
    pub server_selection_timeout_ms: i64,
    // some fields omitted
}

Topology information gathered from server set monitoring.

Fields

The set name for a replica set topology. If the topology is not a replica set, this will be an empty string.

Known servers within the topology.

The server connection health check frequency. The default is 10 seconds.

The size of the latency window for selecting suitable servers. The default is 15 milliseconds.

This defines how long to block for server selection before returning an error. The default is 30 seconds.

Methods

impl TopologyDescription
[src]

Returns a default, unknown topology description.

Returns a server stream for read operations.

Returns a server stream for write operations.

Filters a given set of hosts based on the provided read preference tag sets.

Filter out provided hosts by creating a latency window around the server with the lowest round-trip time.

Returns suitable servers for write operations and whether to take a random element.

Returns suitable servers for read operations and whether to take a random element.

Update the topology description, but don't start any monitors for new servers.

Updates the topology description based on an updated server description.

Trait Implementations

impl Default for TopologyDescription
[src]

Returns the "default value" for a type. Read more

impl Clone for TopologyDescription
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for TopologyDescription
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

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

Performs the conversion.

impl<T> ToOwned for T where
    T: Clone
[src]

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

impl<T> From for T
[src]

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

Immutably borrows from an owned value. Read more

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

Mutably borrows from an owned value. Read more

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

🔬 This is a nightly-only experimental API. (try_from)

Performs the conversion.

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

🔬 This is a nightly-only experimental API. (get_type_id)

this method will likely be replaced by an associated static

Gets the TypeId of self. Read more

impl<T, U> TryInto for T where
    U: TryFrom<T>, 

impl<T> Same for T

Should always be Self