pub struct ProcessBuilder { /* private fields */ }Implementations§
Source§impl ProcessBuilder
A non-consuming builder for Process values.
impl ProcessBuilder
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();Sourcepub fn new(
type: ProcessType,
command: impl IntoIterator<Item = impl Into<String>>,
) -> Self
pub fn new( type: ProcessType, command: impl IntoIterator<Item = impl Into<String>>, ) -> Self
Constructs a new ProcessBuilder with the following defaults:
- No additional, user-overridable, arguments to the command
defaultisfalseworking_directorywill beWorkingDirectory::App.
Sourcepub fn arg(&mut self, arg: impl Into<String>) -> &mut Self
pub fn arg(&mut self, arg: impl Into<String>) -> &mut Self
Adds a user-overridable 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.
Sourcepub fn args(
&mut self,
args: impl IntoIterator<Item = impl Into<String>>,
) -> &mut Self
pub fn args( &mut self, args: impl IntoIterator<Item = impl Into<String>>, ) -> &mut Self
Adds multiple, user-overridable, arguments to the process.
To pass a single argument see arg.
Sourcepub fn default(&mut self, value: bool) -> &mut Self
pub fn default(&mut self, value: bool) -> &mut Self
Sets the default flag on the process.
Indicates that the process type should be selected as the buildpack-provided default during the export phase.
Sourcepub fn working_directory(&mut self, value: WorkingDirectory) -> &mut Self
pub fn working_directory(&mut self, value: WorkingDirectory) -> &mut Self
Set the working directory for the process.
Auto Trait Implementations§
impl Freeze for ProcessBuilder
impl RefUnwindSafe for ProcessBuilder
impl Send for ProcessBuilder
impl Sync for ProcessBuilder
impl Unpin for ProcessBuilder
impl UnwindSafe for ProcessBuilder
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