pub struct ProcessBuilder { /* private fields */ }

Implementations§

A non-consuming builder for Process values.

Examples

ProcessBuilder::new(process_type!("web"), "java")
    .arg("-jar")
    .arg("target/application-1.0.0.jar")
    .default(true)
    .build();

Constructs a new ProcessBuilder with the following defaults:

  • No arguments to the process
  • direct is false
  • default is false
  • working_directory will be WorkingDirectory::App.

Adds an argument to the process.

Only one argument can be passed per use. So instead of:

.arg("-C /path/to/repo")

usage would be:

.arg("-C")
.arg("/path/to/repo")

To pass multiple arguments see args.

Adds multiple arguments to pass to the process.

To pass a single argument see arg.

Sets the direct flag on the process.

If this is true, the lifecycle will launch the command directly, rather than via a shell.

Sets the default flag on the process.

Indicates that the process type should be selected as the buildpack-provided default during the export phase.

Set the working directory for the process.

Builds the Process based on the configuration of this builder.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.