pub fn with_basic_authentication(&self, username: &str, password: &str) -> Self {
        let authentication =
            Authentication::Basic(Credentials::new(username.to_owned(), password.to_owned()));
        DataSource {
            protocol: self.protocol.clone(),
            host: self.host.clone(),
            port: self.port,
            database_name: self.database_name.clone(),
            authentication,
            timeout: self.timeout,
        }
    }
/// Returns a new copy of this `DataSource` which uses basic authentication
/// with the given username and password.
Returns a new copy of this `DataSource` which uses basic authentication
with the given username and password.
Returns a new copy of this ` DataSource ` which uses basic authentication with the given username and password .
pub fn with_basic_authentication(&self, username: &str, password: &str) -> Self {
        let authentication =
            Authentication::Basic(Credentials::new(username.to_owned(), password.to_owned()));
        DataSource {
            protocol: self.protocol.clone(),
            host: self.host.clone(),
            port: self.port,
            database_name: self.database_name.clone(),
            authentication,
            timeout: self.timeout,
        }
    }
pub fn with_basic_authentication ( & self , username : & str , password : & str ) -> Self { let authentication = Authentication :: Basic ( Credentials :: new ( username . to_owned ( ) , password . to_owned ( ) ) ) ; DataSource { protocol : self . protocol . clone ( ) , host : self . host . clone ( ) , port : self . port , database_name : self . database_name . clone ( ) , authentication , timeout : self . timeout , } }
Returns a new copy of this `DataSource` which uses basic authentication
with the given username and password.
Returns a new copy of this ` DataSource ` which uses basic authentication with the given username and password .
&self
username
&str
password
&str
&self
username
&str
password
&str