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>
impl<'a> ServerInfo<'a>
sourcepub fn address(&self) -> &ServerAddress
pub fn address(&self) -> &ServerAddress
Gets the address of the server.
sourcepub fn average_round_trip_time(&self) -> Option<Duration>
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.
sourcepub fn last_update_time(&self) -> Option<DateTime>
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.
sourcepub fn max_wire_version(&self) -> Option<i32>
pub fn max_wire_version(&self) -> Option<i32>
Gets the maximum wire version that the server supports.
sourcepub fn min_wire_version(&self) -> Option<i32>
pub fn min_wire_version(&self) -> Option<i32>
Gets the minimum wire version that the server supports.
sourcepub fn replica_set_name(&self) -> Option<&str>
pub fn replica_set_name(&self) -> Option<&str>
Gets the name of the replica set that the server is part of.
sourcepub fn replica_set_version(&self) -> Option<i32>
pub fn replica_set_version(&self) -> Option<i32>
Gets the version of the replica set that the server is part of.
sourcepub fn server_type(&self) -> ServerType
pub fn server_type(&self) -> ServerType
Get the type of the server.
Gets the tags associated with the server.
sourcepub fn error(&self) -> Option<&Error>
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>
impl<'a> Serialize for ServerInfo<'a>
source§impl<'a> Clone for ServerInfo<'a>
impl<'a> Clone for ServerInfo<'a>
source§fn clone(&self) -> ServerInfo<'a>
fn clone(&self) -> ServerInfo<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more