Struct migrant_lib::Settings
[−]
[src]
pub struct Settings { /* fields omitted */ }
Project settings
These settings are serialized and saved in a project Migrant.toml
config file
or defined explicitly in source using the provided builder methods.
Methods
impl Settings
[src]
fn from_file<T: AsRef<Path>>(path: T) -> Result<Self>
[src]
Initialize from a serialized settings file
fn with_db_type(db_type: DbKind) -> Self
[src]
Initialize an empty Settings
to be configured
fn migration_location<T: AsRef<Path>>(&mut self, p: T) -> Result<&mut Self>
[src]
Set directory to look for migration files.
fn database_path<T: AsRef<Path>>(&mut self, p: T) -> Result<&mut Self>
[src]
Set the path to look for a database file. Note, this is only used for sqlite and is the only property that is used/required for connecting to sqlite databases.
fn database_name(&mut self, name: &str) -> &mut Self
[src]
Set the database name.
fn database_host(&mut self, host: &str) -> &mut Self
[src]
Set the database host.
fn database_port(&mut self, port: u16) -> &mut Self
[src]
Set the database port.
fn database_user(&mut self, user: &str) -> &mut Self
[src]
Set the database user.
fn database_password(&mut self, pass: &str) -> &mut Self
[src]
Set the database password.
fn database_params(&mut self, params: &[(&str, &str)]) -> &mut Self
[src]
Set a collection of database connection parameters.