Enum mongodb::ServerType
source · #[non_exhaustive]
pub enum ServerType {
Standalone,
Mongos,
RsPrimary,
RsSecondary,
RsArbiter,
RsOther,
RsGhost,
LoadBalancer,
Unknown,
}
Expand description
Enum representing the possible types of servers that the driver can connect to.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Standalone
A single, non-replica set mongod.
Mongos
A router used in sharded deployments.
RsPrimary
The primary node in a replica set.
RsSecondary
A secondary node in a replica set.
RsArbiter
A non-data bearing node in a replica set which can participate in elections.
RsOther
Hidden, starting up, or recovering nodes in a replica set.
RsGhost
A member of an uninitialized replica set or a member that has been removed from the replica set config.
LoadBalancer
A load-balancing proxy between the driver and the MongoDB deployment.
Unknown
A server that the driver hasn’t yet communicated with or can’t connect to.
Trait Implementations§
source§impl Clone for ServerType
impl Clone for ServerType
source§fn clone(&self) -> ServerType
fn clone(&self) -> ServerType
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for ServerType
impl Debug for ServerType
source§impl Default for ServerType
impl Default for ServerType
source§impl<'de> Deserialize<'de> for ServerType
impl<'de> Deserialize<'de> for ServerType
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<ServerType> for ServerType
impl PartialEq<ServerType> for ServerType
source§fn eq(&self, other: &ServerType) -> bool
fn eq(&self, other: &ServerType) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for ServerType
impl Serialize for ServerType
impl Copy for ServerType
impl Eq for ServerType
impl StructuralEq for ServerType
impl StructuralPartialEq for ServerType
Auto Trait Implementations§
impl RefUnwindSafe for ServerType
impl Send for ServerType
impl Sync for ServerType
impl Unpin for ServerType
impl UnwindSafe for ServerType
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.