Struct r2d2_mongodb::ConnectionOptions [−][src]
pub struct ConnectionOptions { pub host: String, pub port: u16, pub db: String, pub username: Option<String>, pub password: Option<String>, }
Options with which the connections to MongoDB will be created
To authenticate the connection you have to provide both a username
and password
.
Fields
host: String
Address of the MongoDB server
Default: "localhost"
port: u16
Port on which to connect
Default: 27017
db: String
Name of the database to connect to
Default: "admin"
username: Option<String>
Username for authentication
Default: None
password: Option<String>
Password for authentication
Default: None
Trait Implementations
impl Clone for ConnectionOptions
[src]
impl Clone for ConnectionOptions
fn clone(&self) -> ConnectionOptions
[src]
fn clone(&self) -> ConnectionOptions
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Default for ConnectionOptions
[src]
impl Default for ConnectionOptions
fn default() -> ConnectionOptions
[src]
fn default() -> ConnectionOptions
Returns the "default value" for a type. Read more
Auto Trait Implementations
impl Send for ConnectionOptions
impl Send for ConnectionOptions
impl Sync for ConnectionOptions
impl Sync for ConnectionOptions