Enum mongodb::options::ServerAddress
source · [−]Expand description
An enum representing the address of a MongoDB server.
Currently this just supports addresses that can be connected to over TCP, but alternative address types may be supported in the future (e.g. Unix Domain Socket paths).
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.
Tcp
Fields
host: StringThe hostname or IP address where the MongoDB server can be found.
A TCP/IP host and port combination.
Implementations
Trait Implementations
sourceimpl Clone for ServerAddress
impl Clone for ServerAddress
sourcefn clone(&self) -> ServerAddress
fn clone(&self) -> ServerAddress
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 moresourceimpl Debug for ServerAddress
impl Debug for ServerAddress
sourceimpl Default for ServerAddress
impl Default for ServerAddress
sourceimpl<'de> Deserialize<'de> for ServerAddress
impl<'de> Deserialize<'de> for ServerAddress
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 Display for ServerAddress
impl Display for ServerAddress
sourceimpl FromStr for ServerAddress
impl FromStr for ServerAddress
sourceimpl Hash for ServerAddress
impl Hash for ServerAddress
sourceimpl PartialEq<ServerAddress> for ServerAddress
impl PartialEq<ServerAddress> for ServerAddress
sourceimpl Serialize for ServerAddress
impl Serialize for ServerAddress
impl Eq for ServerAddress
impl StructuralEq for ServerAddress
Auto Trait Implementations
impl RefUnwindSafe for ServerAddress
impl Send for ServerAddress
impl Sync for ServerAddress
impl Unpin for ServerAddress
impl UnwindSafe for ServerAddress
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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 Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
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.