[][src]Struct quaint::connector::MysqlUrl

pub struct MysqlUrl { /* fields omitted */ }

Wraps a connection url and exposes the parsing logic used by quaint, including default values.

Methods

impl MysqlUrl[src]

pub fn new(url: Url) -> Result<Self, Error>[src]

Parse Url to MysqlUrl. Returns error for mistyped connection parameters.

pub fn url(&self) -> &Url[src]

The bare Url to the database.

pub fn username(&self) -> Cow<str>[src]

The percent-decoded database username.

pub fn password(&self) -> Option<Cow<str>>[src]

The percent-decoded database password.

pub fn dbname(&self) -> &str[src]

Name of the database connected. Defaults to mysql.

pub fn host(&self) -> &str[src]

The database host. If socket and host are not set, defaults to localhost.

pub fn socket(&self) -> &Option<String>[src]

If set, connected to the database through a Unix socket.

pub fn port(&self) -> u16[src]

The database port, defaults to 3306.

Trait Implementations

impl Clone for MysqlUrl[src]

impl Debug for MysqlUrl[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,