Trait CommandBuilder

Source
pub trait CommandBuilder: Debug {
    // Required methods
    fn get_program(&self) -> &'static OsStr;
    fn get_program_dir(&self) -> &Option<PathBuf>;
    fn get_envs(&self) -> Vec<(OsString, OsString)>;
    fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self;

    // Provided methods
    fn get_program_file(&self) -> PathBuf { ... }
    fn get_args(&self) -> Vec<OsString> { ... }
    fn build(self) -> Command
       where Self: Sized { ... }
}
Expand description

Trait to build a command

Required Methods§

Source

fn get_program(&self) -> &'static OsStr

Get the program name

Source

fn get_program_dir(&self) -> &Option<PathBuf>

Location of the program binary

Source

fn get_envs(&self) -> Vec<(OsString, OsString)>

Get the environment variables for the command

Source

fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self

Set an environment variable for the command

Provided Methods§

Source

fn get_program_file(&self) -> PathBuf

Fully qualified path to the program binary

Source

fn get_args(&self) -> Vec<OsString>

Get the arguments for the command

Source

fn build(self) -> Command
where Self: Sized,

Build a standard Command

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl CommandBuilder for ClusterDbBuilder

Source§

impl CommandBuilder for CreateDbBuilder

Source§

impl CommandBuilder for CreateUserBuilder

Source§

impl CommandBuilder for DropDbBuilder

Source§

impl CommandBuilder for DropUserBuilder

Source§

impl CommandBuilder for EcpgBuilder

Source§

impl CommandBuilder for InitDbBuilder

Source§

impl CommandBuilder for Oid2NameBuilder

Source§

impl CommandBuilder for PgAmCheckBuilder

Source§

impl CommandBuilder for PgArchiveCleanupBuilder

Source§

impl CommandBuilder for PgBaseBackupBuilder

Source§

impl CommandBuilder for PgChecksumsBuilder

Source§

impl CommandBuilder for PgConfigBuilder

Source§

impl CommandBuilder for PgControlDataBuilder

Source§

impl CommandBuilder for PgCtlBuilder

Source§

impl CommandBuilder for PgDumpBuilder

Source§

impl CommandBuilder for PgDumpAllBuilder

Source§

impl CommandBuilder for PgIsReadyBuilder

Source§

impl CommandBuilder for PgReceiveWalBuilder

Source§

impl CommandBuilder for PgRecvLogicalBuilder

Source§

impl CommandBuilder for PgResetWalBuilder

Source§

impl CommandBuilder for PgRestoreBuilder

Source§

impl CommandBuilder for PgRewindBuilder

Source§

impl CommandBuilder for PgTestFsyncBuilder

Source§

impl CommandBuilder for PgTestTimingBuilder

Source§

impl CommandBuilder for PgUpgradeBuilder

Source§

impl CommandBuilder for PgVerifyBackupBuilder

Source§

impl CommandBuilder for PgWalDumpBuilder

Source§

impl CommandBuilder for PgBenchBuilder

Source§

impl CommandBuilder for PostgresBuilder

Source§

impl CommandBuilder for PsqlBuilder

Source§

impl CommandBuilder for ReindexDbBuilder

Source§

impl CommandBuilder for VacuumDbBuilder

Source§

impl CommandBuilder for VacuumLoBuilder