pub struct PsOutput {
pub stdout: String,
pub stderr: String,
pub exit_code: i32,
pub containers: Vec<ContainerInfo>,
}
Expand description
Output from docker ps command
Fields§
§stdout: String
The raw stdout from the command
stderr: String
The raw stderr from the command
exit_code: i32
Exit code from the command
containers: Vec<ContainerInfo>
Parsed container information (when possible)
Implementations§
Source§impl PsOutput
impl PsOutput
Sourcepub fn combined_output(&self) -> String
pub fn combined_output(&self) -> String
Get combined output (stdout + stderr)
Sourcepub fn stdout_is_empty(&self) -> bool
pub fn stdout_is_empty(&self) -> bool
Check if stdout is empty (ignoring whitespace)
Sourcepub fn stderr_is_empty(&self) -> bool
pub fn stderr_is_empty(&self) -> bool
Check if stderr is empty (ignoring whitespace)
Sourcepub fn container_ids(&self) -> Vec<String>
pub fn container_ids(&self) -> Vec<String>
Get container IDs only (useful when using quiet mode)
Sourcepub fn container_count(&self) -> usize
pub fn container_count(&self) -> usize
Get number of containers found
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PsOutput
impl RefUnwindSafe for PsOutput
impl Send for PsOutput
impl Sync for PsOutput
impl Unpin for PsOutput
impl UnwindSafe for PsOutput
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