Struct migrant_lib::config::PostgresSettingsBuilder [−][src]
Postgres settings builder
Implementations
impl PostgresSettingsBuilder
[src]
pub fn empty() -> Self
[src]
Initialize an empty builder
pub fn database_name(&mut self, name: &str) -> &mut Self
[src]
Required – Set the database name.
pub fn database_user(&mut self, user: &str) -> &mut Self
[src]
Required – Set the database user.
pub fn database_password(&mut self, pass: &str) -> &mut Self
[src]
Required – Set the database password.
pub fn database_host(&mut self, host: &str) -> &mut Self
[src]
Set the database host.
pub fn database_port(&mut self, port: u16) -> &mut Self
[src]
Set the database port.
pub fn database_params(&mut self, params: &[(&str, &str)]) -> &mut Self
[src]
Set a collection of database connection parameters.
pub fn ssl_cert_file<P: AsRef<Path>>(&mut self, file: P) -> &mut Self
[src]
Set a custom ssl cert file
pub fn migration_location<T: AsRef<Path>>(&mut self, p: T) -> Result<&mut Self>
[src]
Set directory to look for migration files.
This can be an absolute or relative path. An absolute path should be preferred. If a relative path is provided, the path will be assumed relative to either the settings file’s directory if a settings file exists, or the current directory.
pub fn build(&self) -> Result<Settings>
[src]
Build a Settings
object
Trait Implementations
impl Clone for PostgresSettingsBuilder
[src]
fn clone(&self) -> PostgresSettingsBuilder
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for PostgresSettingsBuilder
[src]
impl Default for PostgresSettingsBuilder
[src]
fn default() -> PostgresSettingsBuilder
[src]
Auto Trait Implementations
impl RefUnwindSafe for PostgresSettingsBuilder
impl Send for PostgresSettingsBuilder
impl Sync for PostgresSettingsBuilder
impl Unpin for PostgresSettingsBuilder
impl UnwindSafe for PostgresSettingsBuilder
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,
pub 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> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub 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.
pub 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>,