[][src]Struct mongodb::topology::server::ServerDescription

pub struct ServerDescription {
    pub server_type: ServerType,
    pub err: Arc<Option<Error>>,
    pub round_trip_time: Option<i64>,
    pub min_wire_version: i64,
    pub max_wire_version: i64,
    pub me: Option<Host>,
    pub hosts: Vec<Host>,
    pub passives: Vec<Host>,
    pub arbiters: Vec<Host>,
    pub tags: BTreeMap<String, String>,
    pub set_name: String,
    pub election_id: Option<ObjectId>,
    pub primary: Option<Host>,
    pub set_version: Option<i64>,
}

Server information gathered from server monitoring.

Fields

server_type: ServerType

The server type.

err: Arc<Option<Error>>

Any error encountered while monitoring this server.

round_trip_time: Option<i64>

The average round-trip time over the last 5 monitoring checks.

min_wire_version: i64

The minimum wire version supported by this server.

max_wire_version: i64

The maximum wire version supported by this server.

me: Option<Host>

The server's host information, if it is part of a replica set.

hosts: Vec<Host>

All hosts in the replica set known by this server.

passives: Vec<Host>

All passive members of the replica set known by this server.

arbiters: Vec<Host>

All arbiters in the replica set known by this server.

tags: BTreeMap<String, String>

Server tags for targeted read operations on specific replica set members.

set_name: String

The replica set name.

election_id: Option<ObjectId>

The server's current election id, if it believes it is a primary.

primary: Option<Host>

The server's opinion of who the primary is.

set_version: Option<i64>

The current replica set version number.

Methods

impl ServerDescription[src]

pub fn new() -> ServerDescription[src]

Returns a default, unknown server description.

pub fn update(&mut self, ismaster: IsMasterResult, round_trip_time: i64)[src]

pub fn set_err(&mut self, err: Error)[src]

pub fn clear(&mut self)[src]

Trait Implementations

impl Default for ServerDescription[src]

impl Clone for ServerDescription[src]

impl Debug for ServerDescription[src]

Auto Trait Implementations

Blanket Implementations

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

type Owned = T

The resulting type after obtaining ownership.

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