Struct mysql_async::OptsBuilder [] [src]

pub struct OptsBuilder { /* fields omitted */ }

Provides a way to build Opts.

This example is not tested
// You can create new default builder
let mut builder = OptsBuilder::new();
builder.ip_or_hostname(Some("foo"))
       .db_name(Some("bar"))
       .ssl_opts(Some(("/foo/cert.pem", None::<(String, String)>)));

// Or use existing T: Into<Opts>
let mut builder = OptsBuilder::from_opts(existing_opts);
builder.ip_or_hostname(Some("foo"))
       .db_name(Some("bar"));

Methods

impl OptsBuilder
[src]

[src]

[src]

Important traits for &'a mut W
[src]

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

Important traits for &'a mut W
[src]

TCP port of mysql server (defaults to 3306).

Important traits for &'a mut W
[src]

User (defaults to None).

Important traits for &'a mut W
[src]

Password (defaults to None).

Important traits for &'a mut W
[src]

Database name (defaults to None).

Important traits for &'a mut W
[src]

Commands to execute on each new database connection.

Important traits for &'a mut W
[src]

TCP keep alive timeout in milliseconds (defaults to None).

Important traits for &'a mut W
[src]

Set the TCP_NODELAY option for the mysql connection (defaults to true).

Setting this option to false re-enables Nagle's algorithm, which can cause unusually high latency (~40ms) but may increase maximum throughput. See #132.

Important traits for &'a mut W
[src]

Handler for local infile requests (defaults to None).

Important traits for &'a mut W
[src]

Lower bound of opened connections for Pool (defaults to 10. None to reset to default).

Important traits for &'a mut W
[src]

Lower bound of opened connections for Pool (defaults to 100. None to reset to default).

Important traits for &'a mut W
[src]

Pool will close connection if time since last IO exceeds this value (defaults to wait_timeout. None to reset to default).

Important traits for &'a mut W
[src]

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

Call with None to reset to default.

Important traits for &'a mut W
[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 Debug for OptsBuilder
[src]

[src]

Formats the value using the given formatter. Read more

impl Clone for OptsBuilder
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Eq for OptsBuilder
[src]

impl PartialEq for OptsBuilder
[src]

[src]

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

[src]

This method tests for !=.

impl Default for OptsBuilder
[src]

[src]

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

impl From<OptsBuilder> for Opts
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for OptsBuilder

impl Sync for OptsBuilder