pub struct PostgresConnectionSettings {
pub host: String,
pub port: u16,
pub user: String,
pub password: String,
pub database: String,
pub options: Option<String>,
pub replication: Option<String>,
/* private fields */
}Fields§
§host: String§port: u16§user: String§password: String§database: String§options: Option<String>§replication: Option<String>Implementations§
Source§impl PostgresConnectionSettings
impl PostgresConnectionSettings
pub fn new(host: impl Into<String>) -> PostgresConnectionSettings
pub fn port(self, port: u16) -> PostgresConnectionSettings
pub fn user(self, user: impl Into<String>) -> PostgresConnectionSettings
pub fn password(self, password: impl Into<String>) -> PostgresConnectionSettings
pub fn database(self, database: impl Into<String>) -> PostgresConnectionSettings
pub fn options(self, options: impl Into<String>) -> PostgresConnectionSettings
pub fn replication( self, replication: impl Into<String>, ) -> PostgresConnectionSettings
Sourcepub fn register_enum<T>(self) -> PostgresConnectionSettingswhere
T: PostgresEnum,
pub fn register_enum<T>(self) -> PostgresConnectionSettingswhere
T: PostgresEnum,
Register a PostgreSQL enum type for OID resolution at pool creation time.
Sourcepub fn enum_type_names(&self) -> &[&'static str]
pub fn enum_type_names(&self) -> &[&'static str]
Returns the registered enum type names.
Trait Implementations§
Source§impl Clone for PostgresConnectionSettings
impl Clone for PostgresConnectionSettings
Source§fn clone(&self) -> PostgresConnectionSettings
fn clone(&self) -> PostgresConnectionSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for PostgresConnectionSettings
impl Default for PostgresConnectionSettings
Source§fn default() -> PostgresConnectionSettings
fn default() -> PostgresConnectionSettings
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PostgresConnectionSettings
impl RefUnwindSafe for PostgresConnectionSettings
impl Send for PostgresConnectionSettings
impl Sync for PostgresConnectionSettings
impl Unpin for PostgresConnectionSettings
impl UnsafeUnpin for PostgresConnectionSettings
impl UnwindSafe for PostgresConnectionSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more