[−][src]Struct quaint::connector::PostgresUrl
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]
fn clone(&self) -> PostgresUrl
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PostgresUrl
[src]
Auto Trait Implementations
impl RefUnwindSafe for PostgresUrl
impl Send for PostgresUrl
impl Sync for PostgresUrl
impl Unpin for PostgresUrl
impl UnwindSafe for PostgresUrl
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>,