Type Alias mongodb::event::sdam::ServerDescription

source ·
pub type ServerDescription = ServerInfo<'static>;
Expand description

A description of the most up-to-date information known about a server. Further details can be found in the Server Discovery and Monitoring specification.

Aliased Type§

struct ServerDescription { /* private fields */ }

Implementations

source§

impl<'a> ServerInfo<'a>

source

pub fn address(&self) -> &ServerAddress

Gets the address of the server.

source

pub fn average_round_trip_time(&self) -> Option<Duration>

Gets the weighted average of the time it has taken for a server check to round-trip from the driver to the server.

This is the value that the driver uses internally to determine the latency window as part of server selection.

source

pub fn last_update_time(&self) -> Option<DateTime>

Gets the last time that the driver’s monitoring thread for the server updated the internal information about the server.

source

pub fn max_wire_version(&self) -> Option<i32>

Gets the maximum wire version that the server supports.

source

pub fn min_wire_version(&self) -> Option<i32>

Gets the minimum wire version that the server supports.

source

pub fn replica_set_name(&self) -> Option<&str>

Gets the name of the replica set that the server is part of.

source

pub fn replica_set_version(&self) -> Option<i32>

Gets the version of the replica set that the server is part of.

source

pub fn server_type(&self) -> ServerType

Get the type of the server.

source

pub fn tags(&self) -> Option<&TagSet>

Gets the tags associated with the server.

source

pub fn error(&self) -> Option<&Error>

Gets the error that caused the server’s state to be transitioned to Unknown, if any.

When the driver encounters certain errors during operation execution or server monitoring, it transitions the affected server’s state to Unknown, rendering the server unusable for future operations until it is confirmed to be in healthy state again.

Trait Implementations

source§

impl<'a> Serialize for ServerInfo<'a>

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'a> Clone for ServerInfo<'a>

source§

fn clone(&self) -> ServerInfo<'a>

Returns a copy of the value. Read more
1.0.0 · source§

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

Performs copy-assignment from source. Read more
source§

impl<'a> Display for ServerInfo<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
source§

impl<'a> Debug for ServerInfo<'a>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more