pub struct ProcessManager { /* private fields */ }Implementations§
Source§impl ProcessManager
impl ProcessManager
pub fn new(_cli: &Cli) -> Arc<Self>
pub fn cleanup(&self)
pub fn last_signal_time(&self) -> Option<SystemTime>
pub fn time_between_signals(&self) -> Option<Duration>
pub fn reset_signalled(&self)
pub fn has_signalled(&self) -> usize
Sourcepub fn update_status_line(output: &str, raw_mode: bool) -> Result<()>
pub fn update_status_line(output: &str, raw_mode: bool) -> Result<()>
Updates the status line in the terminal.
When raw_mode is true, it uses crossterm commands to clear the current line.
Otherwise, it uses the carriage return (\r) trick.
pub fn register(&self, pid: u32, handle: Arc<Mutex<CargoProcessHandle>>) -> u32
pub fn take(&self, pid: u32) -> Option<Arc<Mutex<CargoProcessHandle>>>
pub fn remove(&self, pid: u32)
pub fn try_wait(&self, pid: u32) -> Result<Option<ExitStatus>>
pub fn get(&self, pid: u32) -> Option<Arc<Mutex<CargoProcessHandle>>>
pub fn is_alive(&self, pid: u32) -> bool
pub fn list(&self) -> Vec<u32>
pub fn status(&self)
Sourcepub fn kill_try_by_pid(&self, pid: u32) -> Result<bool>
pub fn kill_try_by_pid(&self, pid: u32) -> Result<bool>
Attempts to kill the process corresponding to the provided PID. Returns Ok(true) if the process was found and exited (even via signal), Ok(false) if the process wasn’t found or didn’t exit after trying all signals (in which case we drop the handle), or Err if something went wrong.
pub fn e_window_kill(&self, pid: u32)
Sourcepub fn e_window_kill_all(&self)
pub fn e_window_kill_all(&self)
Kill all e_window processes tracked in GLOBAL_EWINDOW_PIDS.
Sourcepub fn kill_one(&self) -> Result<bool>
pub fn kill_one(&self) -> Result<bool>
Attempts to kill one process. Returns Ok(true) if a process was found and killed, Ok(false) if none found, or an error if something went wrong.
pub fn kill_all(&self)
pub fn get_terminal_error(&self, pid: u32) -> Option<TerminalError>
Sourcepub fn wait(
&self,
pid: u32,
_duration: Option<Duration>,
) -> Result<CargoProcessResult>
pub fn wait( &self, pid: u32, _duration: Option<Duration>, ) -> Result<CargoProcessResult>
Wait for the process to finish, show interactive status, then return a result
pub fn record_result(&self, result: CargoProcessResult)
pub fn generate_report(&self, create_gist: bool)
pub fn format_process_status( pid: u32, start_time: Option<SystemTime>, target: &CargoTarget, target_dimensions: (usize, usize), ) -> String
Sourcepub fn print_exact_output(&self)
pub fn print_exact_output(&self)
Print the exact diagnostic output as captured.
Sourcepub fn print_prefixed_summary(&self)
pub fn print_prefixed_summary(&self)
Print a one‑line summary per warning, numbered with leading zeros.
Sourcepub fn print_compact(&self)
pub fn print_compact(&self)
file:line:col – source_line, colored by level.
Sourcepub fn print_shortened_output(&self)
pub fn print_shortened_output(&self)
Print a shortened version: warnings first then errors.
pub fn kill_by_pid(&self, pid: u32) -> Result<bool>
Trait Implementations§
Source§impl Debug for ProcessManager
impl Debug for ProcessManager
Source§impl Drop for ProcessManager
impl Drop for ProcessManager
Source§impl ProcessObserver for ProcessManager
impl ProcessObserver for ProcessManager
Auto Trait Implementations§
impl !Freeze for ProcessManager
impl !RefUnwindSafe for ProcessManager
impl Send for ProcessManager
impl Sync for ProcessManager
impl Unpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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> ⓘ
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> ⓘ
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