Struct mysql::Opts[][src]

pub struct Opts { /* fields omitted */ }

Mysql connection options.

Build one with OptsBuilder.

Methods

impl Opts
[src]

Address of mysql server (defaults to 127.0.0.1). Hostnames should also work.

TCP port of mysql server (defaults to 3306).

Socket path on unix or pipe name on windows (defaults to None).

User (defaults to None).

Password (defaults to None).

Database name (defaults to None).

The timeout for each attempt to write to the server.

The timeout for each attempt to write to the server.

Prefer socket connection (defaults to true).

Will reconnect via socket (or named pipe on windows) after TCP connection to 127.0.0.1 if true.

Important traits for Vec<u8>

Commands to execute on each new database connection.

Only available if ssl feature enabled.

Perform or not ssl peer verification (defaults to false). Only make sense if ssl_opts is not None.

Whether TCP_NODELAY will be set for mysql connection.

TCP keep alive time for mysql connection.

Callback to handle requests for local files.

Tcp connect timeout (defaults to None).

Bind address for a client (defaults to None).

Use carefully. Will probably make pool unusable because of address already in use errors.

Number of prepared statements cached on the client side (per connection). Defaults to 10.

If true, then client will ask for compression if server supports it (defaults to false).

Additional client capabilities to set (defaults to empty).

This value will be OR'ed with other client capabilities during connection initialisation.

Note

It is a good way to set something like CLIENT_FOUND_ROWS but you should note that it won't let you to interfere with capabilities managed by other options (like CLIENT_SSL or CLIENT_COMPRESS). Also note that some capabilities are reserved, pointless or may broke the connection, so this option should be used with caution.

Trait Implementations

impl Clone for Opts
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Eq for Opts
[src]

impl PartialEq for Opts
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Debug for Opts
[src]

Formats the value using the given formatter. Read more

impl Default for Opts
[src]

Returns the "default value" for a type. Read more

impl From<OptsBuilder> for Opts
[src]

Performs the conversion.

impl<S: AsRef<str>> From<S> for Opts
[src]

Performs the conversion.

Auto Trait Implementations

impl Send for Opts

impl Sync for Opts