[−][src]Struct mysql_async::Opts
Mysql connection options.
Build one with OptsBuilder
.
Methods
impl Opts
[src]
pub fn from_url(url: &str) -> Result<Opts, UrlError>
[src]
pub fn get_ip_or_hostname(&self) -> &str
[src]
Address of mysql server (defaults to 127.0.0.1
). Hostnames should also work.
pub fn get_tcp_port(&self) -> u16
[src]
TCP port of mysql server (defaults to 3306
).
pub fn get_user(&self) -> Option<&str>
[src]
User (defaults to None
).
pub fn get_pass(&self) -> Option<&str>
[src]
Password (defaults to None
).
pub fn get_db_name(&self) -> Option<&str>
[src]
Database name (defaults to None
).
pub fn get_init(&self) -> &[String]
[src]
Commands to execute on each new database connection.
pub fn get_tcp_keepalive(&self) -> Option<u32>
[src]
TCP keep alive timeout in milliseconds (defaults to `None).
pub fn get_tcp_nodelay(&self) -> bool
[src]
Whether TCP_NODELAY
will be set for mysql connection.
pub fn get_local_infile_handler(&self) -> Option<Arc<dyn LocalInfileHandler>>
[src]
Local infile handler
pub fn get_pool_constraints(&self) -> &PoolConstraints
[src]
/// Bounds for the number of opened connections in Pool
(defaults to min: 10, max: 100
).
pub fn get_conn_ttl(&self) -> Option<u32>
[src]
Pool will close connection if time since last IO exceeds this value
(defaults to wait_timeout
).
pub fn get_stmt_cache_size(&self) -> usize
[src]
Number of prepared statements cached on the client side (per connection). Defaults to 10
.
pub fn get_ssl_opts(&self) -> Option<&SslOpts>
[src]
Driver will require SSL connection if this option isn't None
(default to None
).
This option requires ssl
feature to work.
Trait Implementations
impl PartialEq<Opts> for Opts
[src]
impl Eq for Opts
[src]
impl Clone for Opts
[src]
fn clone(&self) -> Opts
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl From<OptsBuilder> for Opts
[src]
fn from(builder: OptsBuilder) -> Opts
[src]
impl<T: AsRef<str> + Sized> From<T> for Opts
[src]
impl Default for Opts
[src]
impl Debug for Opts
[src]
impl FromStr for Opts
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Same for T
type Output = T
Should always be Self