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

Address of the MongoDB server

Default: "localhost"

Port on which to connect

Default: 27017

Name of the database to connect to

Default: "admin"

Username for authentication

Default: None

Password for authentication

Default: None

Trait Implementations

impl Clone for ConnectionOptions
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Default for ConnectionOptions
[src]

Returns the "default value" for a type. Read more

Auto Trait Implementations