Struct mysql::Opts
[−]
[src]
pub struct Opts { // some fields omitted }
Mysql connection options.
Build one with OptsBuilder
.
Methods
impl Opts
fn from_url(url: &str) -> Result<Opts, UrlError>
fn get_ip_or_hostname(&self) -> &Option<String>
Address of mysql server (defaults to 127.0.0.1
). Hostnames should also work.
fn get_tcp_port(&self) -> u16
TCP port of mysql server (defaults to 3306
).
fn get_user(&self) -> &Option<String>
User (defaults to None
).
fn get_pass(&self) -> &Option<String>
Password (defaults to None
).
fn get_db_name(&self) -> &Option<String>
Database name (defaults to None
).
fn get_read_timeout(&self) -> &Option<Duration>
The timeout for each attempt to write to the server.
fn get_write_timeout(&self) -> &Option<Duration>
The timeout for each attempt to write to the server.
fn get_init(&self) -> &Vec<String>
Commands to execute on each new database connection.