pub struct Process {
pub command: String,
pub cwd: String,
pub log_monitors: Vec<String>,
pub name: String,
pub onfail: Option<String>,
pub onsucceed: Option<String>,
}
Expand description
Represents and contains a given runtime job task process.
This object contains all of the data necessary to run a given process. This data includes the
process name, the command
which should be executed using the current BinCommand
, the
directory in which to execute the command
, any log monitors which should monitor the command
output, as well as any actions which should be performed when the command fails or succeeds.
Fields
command: String
cwd: String
log_monitors: Vec<String>
name: String
onfail: Option<String>
onsucceed: Option<String>
Implementations
sourceimpl Process
impl Process
sourcepub fn cwd(self, d: String) -> Self
pub fn cwd(self, d: String) -> Self
Builds Process
with the specified current working directory.
This directory is where command
will be executed using the runtime BinCommand
.
sourcepub fn log_monitors(self, m: Vec<String>) -> Self
pub fn log_monitors(self, m: Vec<String>) -> Self
Builds Process
with the specified log monitors.
sourcepub fn onfail(self, f: Option<String>) -> Self
pub fn onfail(self, f: Option<String>) -> Self
Builds Process
with the name of the action to execute if the command
fails.
Trait Implementations
impl Eq for Process
impl StructuralEq for Process
impl StructuralPartialEq for Process
Auto Trait Implementations
impl RefUnwindSafe for Process
impl Send for Process
impl Sync for Process
impl Unpin for Process
impl UnwindSafe for Process
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> CloneAny for T where
T: Any + Clone,
impl<T> CloneAny for T where
T: Any + Clone,
fn clone_any(&self) -> Box<dyn CloneAny + 'static, Global>
fn clone_any_send(&self) -> Box<dyn CloneAny + Send + 'static, Global> where
T: Send,
fn clone_any_sync(&self) -> Box<dyn CloneAny + Sync + 'static, Global> where
T: Sync,
fn clone_any_send_sync(
&self
) -> Box<dyn CloneAny + Sync + Send + 'static, Global> where
T: Send + Sync,
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more