[][src]Struct quaint::connector::PostgresUrl

pub struct PostgresUrl { /* fields omitted */ }

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

Methods

impl PostgresUrl[src]

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

Parse Url to PostgresUrl. 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 host(&self) -> &str[src]

The database host. Taken first from the host query parameter, then from the host part of the URL. For socket connections, the query parameter must be used.

If none of them are set, defaults to localhost.

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

Name of the database connected. Defaults to postgres.

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

The percent-decoded database password.

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

The database port, defaults to 5432.

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

The database schema, defaults to public.

Trait Implementations

impl Clone for PostgresUrl[src]

impl Debug for PostgresUrl[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>,