simple_mongo/structures/
options.rs

1use crate::structures::credentials::Credentials;
2
3#[derive(Clone)]
4pub struct Options {
5    pub uri: String,
6    pub database_name: String,
7    pub collection_path: String,
8    pub credentials: Option<Credentials>,
9}
10
11impl Options {
12    pub fn new(
13        uri: String,
14        database_name: String,
15        collection_path: String,
16        credentials: Option<Credentials>,
17    ) -> Options {
18        Options {
19            uri,
20            database_name,
21            collection_path,
22            credentials: credentials
23        }
24    }
25
26    // pub fn set_credentials(&mut self,creds:Credentials){
27    //     self.credentials = Some(creds);
28    // }
29}