pub fn use_database<DbName>(&self, database_name: DbName) -> Self
    where
        DbName: Into<String>,
    {
        let database_name = database_name.into();
        let database_name = if database_name.is_empty() {
            None
        } else {
            Some(database_name.to_owned())
        };
        DataSource {
            protocol: self.protocol.clone(),
            host: self.host.clone(),
            port: self.port,
            database_name,
            authentication: self.authentication.clone(),
            timeout: self.timeout,
        }
    }
/// Returns a new copy of this `DataSource` with the database parameter set
/// to the given database name.
Returns a new copy of this `DataSource` with the database parameter set
to the given database name.
Returns a new copy of this ` DataSource ` with the database parameter set to the given database name .
pub fn use_database<DbName>(&self, database_name: DbName) -> Self
    where
        DbName: Into<String>,
    {
        let database_name = database_name.into();
        let database_name = if database_name.is_empty() {
            None
        } else {
            Some(database_name.to_owned())
        };
        DataSource {
            protocol: self.protocol.clone(),
            host: self.host.clone(),
            port: self.port,
            database_name,
            authentication: self.authentication.clone(),
            timeout: self.timeout,
        }
    }
pub fn use_database < DbName > ( & self , database_name : DbName ) -> Self where DbName : Into < String > , { let database_name = database_name . into ( ) ; let database_name = if database_name . is_empty ( ) { None } else { Some ( database_name . to_owned ( ) ) } ; DataSource { protocol : self . protocol . clone ( ) , host : self . host . clone ( ) , port : self . port , database_name , authentication : self . authentication . clone ( ) , timeout : self . timeout , } }
Returns a new copy of this `DataSource` with the database parameter set
to the given database name.
Returns a new copy of this ` DataSource ` with the database parameter set to the given database name .
&self
database_name
DbName
&self
database_name
DbName