Struct mongodb::ServerInfo
source · [−]pub struct ServerInfo<'a> { /* private fields */ }
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.
Implementations
sourceimpl<'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.
Trait Implementations
sourceimpl<'a> Clone for ServerInfo<'a>
impl<'a> Clone for ServerInfo<'a>
sourcefn clone(&self) -> ServerInfo<'a>
fn clone(&self) -> ServerInfo<'a>
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl<'a> Debug for ServerInfo<'a>
impl<'a> Debug for ServerInfo<'a>
Auto Trait Implementations
impl<'a> RefUnwindSafe for ServerInfo<'a>
impl<'a> Send for ServerInfo<'a>
impl<'a> Sync for ServerInfo<'a>
impl<'a> Unpin for ServerInfo<'a>
impl<'a> UnwindSafe for ServerInfo<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more