Struct postgresql_commands::createdb::CreateDbBuilder
source · pub struct CreateDbBuilder { /* private fields */ }
Expand description
createdb
creates a PostgreSQL
database.
Implementations§
source§impl CreateDbBuilder
impl CreateDbBuilder
sourcepub fn new() -> Self
pub fn new() -> Self
Create a new CreateDbBuilder
sourcepub fn from(settings: &dyn Settings) -> Self
pub fn from(settings: &dyn Settings) -> Self
Create a new CreateDbBuilder
from Settings
sourcepub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
pub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
Location of the program binary
sourcepub fn tablespace<S: AsRef<OsStr>>(self, tablespace: S) -> Self
pub fn tablespace<S: AsRef<OsStr>>(self, tablespace: S) -> Self
Default tablespace for the database
sourcepub fn lc_collate<S: AsRef<OsStr>>(self, lc_collate: S) -> Self
pub fn lc_collate<S: AsRef<OsStr>>(self, lc_collate: S) -> Self
LC_COLLATE
setting for the database
sourcepub fn icu_locale<S: AsRef<OsStr>>(self, icu_locale: S) -> Self
pub fn icu_locale<S: AsRef<OsStr>>(self, icu_locale: S) -> Self
ICU locale setting for the database
sourcepub fn icu_rules<S: AsRef<OsStr>>(self, icu_rules: S) -> Self
pub fn icu_rules<S: AsRef<OsStr>>(self, icu_rules: S) -> Self
ICU rules setting for the database
sourcepub fn locale_provider<S: AsRef<OsStr>>(self, locale_provider: S) -> Self
pub fn locale_provider<S: AsRef<OsStr>>(self, locale_provider: S) -> Self
Locale provider for the database’s default collation
sourcepub fn strategy<S: AsRef<OsStr>>(self, strategy: S) -> Self
pub fn strategy<S: AsRef<OsStr>>(self, strategy: S) -> Self
Database creation strategy wal_log
or file_copy
sourcepub fn no_password(self) -> Self
pub fn no_password(self) -> Self
Never prompt for password
sourcepub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
pub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
user password
sourcepub fn maintenance_db<S: AsRef<OsStr>>(self, db: S) -> Self
pub fn maintenance_db<S: AsRef<OsStr>>(self, db: S) -> Self
Alternate maintenance database
sourcepub fn description<S: AsRef<OsStr>>(self, description: S) -> Self
pub fn description<S: AsRef<OsStr>>(self, description: S) -> Self
Database description
Trait Implementations§
source§impl Clone for CreateDbBuilder
impl Clone for CreateDbBuilder
source§fn clone(&self) -> CreateDbBuilder
fn clone(&self) -> CreateDbBuilder
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl CommandBuilder for CreateDbBuilder
impl CommandBuilder for CreateDbBuilder
source§fn get_program(&self) -> &'static OsStr
fn get_program(&self) -> &'static OsStr
Get the program name
source§fn get_program_dir(&self) -> &Option<PathBuf>
fn get_program_dir(&self) -> &Option<PathBuf>
Location of the program binary
source§fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self
fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self
Set an environment variable for the command
source§fn get_program_file(&self) -> PathBuf
fn get_program_file(&self) -> PathBuf
Fully qualified path to the program binary
source§impl Debug for CreateDbBuilder
impl Debug for CreateDbBuilder
source§impl Default for CreateDbBuilder
impl Default for CreateDbBuilder
source§fn default() -> CreateDbBuilder
fn default() -> CreateDbBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CreateDbBuilder
impl RefUnwindSafe for CreateDbBuilder
impl Send for CreateDbBuilder
impl Sync for CreateDbBuilder
impl Unpin for CreateDbBuilder
impl UnwindSafe for CreateDbBuilder
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)