pub struct PgCtlBuilder { /* private fields */ }
Expand description
pg_ctl
is a utility to initialize, start, stop, or control a PostgreSQL
server.
Implementations§
Source§impl PgCtlBuilder
impl PgCtlBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new PgCtlBuilder
Sourcepub fn from(settings: &dyn Settings) -> Self
pub fn from(settings: &dyn Settings) -> Self
Create a new PgCtlBuilder
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 core_files(self) -> Self
pub fn core_files(self) -> Self
allow postgres to produce core files
Sourcepub fn options<S: AsRef<OsStr>>(self, options: &[S]) -> Self
pub fn options<S: AsRef<OsStr>>(self, options: &[S]) -> Self
command line options to pass to postgres (PostgreSQL
server executable) or initdb
Sourcepub fn path_to_postgres<S: AsRef<OsStr>>(self, path_to_postgres: S) -> Self
pub fn path_to_postgres<S: AsRef<OsStr>>(self, path_to_postgres: S) -> Self
normally not necessary
Sourcepub fn shutdown_mode(self, shutdown_mode: ShutdownMode) -> Self
pub fn shutdown_mode(self, shutdown_mode: ShutdownMode) -> Self
MODE can be “smart”, “fast”, or “immediate”
Trait Implementations§
Source§impl Clone for PgCtlBuilder
impl Clone for PgCtlBuilder
Source§fn clone(&self) -> PgCtlBuilder
fn clone(&self) -> PgCtlBuilder
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl CommandBuilder for PgCtlBuilder
impl CommandBuilder for PgCtlBuilder
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 PgCtlBuilder
impl Debug for PgCtlBuilder
Source§impl Default for PgCtlBuilder
impl Default for PgCtlBuilder
Source§fn default() -> PgCtlBuilder
fn default() -> PgCtlBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PgCtlBuilder
impl RefUnwindSafe for PgCtlBuilder
impl Send for PgCtlBuilder
impl Sync for PgCtlBuilder
impl Unpin for PgCtlBuilder
impl UnwindSafe for PgCtlBuilder
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