[−][src]Struct quaint::connector::MysqlUrl
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
Auto Trait Implementations
impl RefUnwindSafe for MysqlUrl
impl Send for MysqlUrl
impl Sync for MysqlUrl
impl Unpin for MysqlUrl
impl UnwindSafe for MysqlUrl
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> 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, U> TryInto<U> 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<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,