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
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
sourceimpl Clone for ServerType
impl Clone for ServerType
sourcefn clone(&self) -> ServerType
fn clone(&self) -> ServerType
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 Debug for ServerType
impl Debug for ServerType
sourceimpl Default for ServerType
impl Default for ServerType
sourceimpl<'de> Deserialize<'de> for ServerType
impl<'de> Deserialize<'de> for ServerType
sourcefn 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
sourceimpl PartialEq<ServerType> for ServerType
impl PartialEq<ServerType> for ServerType
sourceimpl 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
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<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.