Struct migrant_lib::config::PostgresSettingsBuilder[][src]

pub struct PostgresSettingsBuilder { /* fields omitted */ }

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]

impl Debug for PostgresSettingsBuilder[src]

impl Default for PostgresSettingsBuilder[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> 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.