pub struct ProcessManager {
pub output_tx: Sender<OutputLine>,
/* private fields */
}Fields§
§output_tx: Sender<OutputLine>Implementations§
Source§impl ProcessManager
impl ProcessManager
pub fn new(session: &str) -> Self
pub async fn spawn_process( &mut self, command: &str, name: Option<String>, cwd: Option<&str>, env: Option<&HashMap<String, String>>, ) -> Response
pub async fn stop_process(&mut self, target: &str) -> Response
pub async fn stop_all(&mut self) -> Response
pub async fn restart_process(&mut self, target: &str) -> Response
pub fn status(&mut self) -> Response
Sourcepub fn is_process_exited(&mut self, target: &str) -> Option<Option<i32>>
pub fn is_process_exited(&mut self, target: &str) -> Option<Option<i32>>
Returns None if process not found or still running.
Returns Some(exit_code) if process has exited (exit_code is None for signal kills).
pub fn has_process(&self, target: &str) -> bool
Auto Trait Implementations§
impl Freeze for ProcessManager
impl !RefUnwindSafe for ProcessManager
impl Send for ProcessManager
impl Sync for ProcessManager
impl Unpin for ProcessManager
impl UnsafeUnpin for ProcessManager
impl !UnwindSafe for ProcessManager
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more