pub struct Printer { /* private fields */ }Expand description
Main printer for CLI output
Implementations§
Source§impl Printer
impl Printer
Sourcepub fn new(format: OutputFormat, verbose: bool) -> Self
pub fn new(format: OutputFormat, verbose: bool) -> Self
Creates a new printer with the specified format and verbosity.
Sourcepub fn print_processes_with_context(
&self,
processes: &[Process],
context: Option<&str>,
)
pub fn print_processes_with_context( &self, processes: &[Process], context: Option<&str>, )
Print a list of processes with optional context (e.g., “in /path/to/dir”)
Sourcepub fn print_processes(&self, processes: &[Process])
pub fn print_processes(&self, processes: &[Process])
Print a list of processes
Sourcepub fn print_ports(&self, ports: &[PortInfo])
pub fn print_ports(&self, ports: &[PortInfo])
Print port information
Sourcepub fn print_port_info(&self, port_info: &PortInfo)
pub fn print_port_info(&self, port_info: &PortInfo)
Print a single port info (for proc on :port)
Sourcepub fn print_json<T: Serialize>(&self, data: &T)
pub fn print_json<T: Serialize>(&self, data: &T)
Print JSON output for any serializable type
Sourcepub fn print_kill_result(
&self,
killed: &[Process],
failed: &[(Process, String)],
)
pub fn print_kill_result( &self, killed: &[Process], failed: &[(Process, String)], )
Print kill confirmation
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Printer
impl RefUnwindSafe for Printer
impl Send for Printer
impl Sync for Printer
impl Unpin for Printer
impl UnwindSafe for Printer
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