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

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<StringString>,
    pub set_name: String,
    pub election_id: Option<ObjectId>,
    pub primary: Option<Host>,
}

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<StringString>

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.

Methods

impl ServerDescription
[src]

fn new() -> ServerDescription

Returns a default, unknown server description.

fn update(&mut self, ismaster: IsMasterResult, round_trip_time: i64)

fn set_err(&mut self, err: Error)

fn clear(&mut self)

Trait Implementations

impl Debug for ServerDescription
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for ServerDescription
[src]

fn clone(&self) -> ServerDescription

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more