pub struct CommandOutput {
pub stdout: String,
pub stderr: String,
pub exit_code: i32,
pub success: bool,
}
Expand description
Output from executing a Docker command
Fields§
§stdout: String
Standard output from the command
stderr: String
Standard error from the command
exit_code: i32
Exit code
success: bool
Whether the command was successful
Implementations§
Source§impl CommandOutput
Extension methods for ContextInspectCommand
output
impl CommandOutput
Extension methods for ContextInspectCommand
output
Source§impl CommandOutput
Extension methods for ContextLsCommand
output
impl CommandOutput
Extension methods for ContextLsCommand
output
Sourcepub fn parse_contexts(&self) -> Result<Vec<ContextInfo>>
pub fn parse_contexts(&self) -> Result<Vec<ContextInfo>>
Sourcepub fn current_context(&self) -> Option<String>
pub fn current_context(&self) -> Option<String>
Get the current context name
Source§impl CommandOutput
Extension methods for ContextRmCommand
output
impl CommandOutput
Extension methods for ContextRmCommand
output
Sourcepub fn removed_contexts(&self) -> Vec<String>
pub fn removed_contexts(&self) -> Vec<String>
Get removed context names from output
Source§impl CommandOutput
Extension methods for ContextUseCommand
output
impl CommandOutput
Extension methods for ContextUseCommand
output
Sourcepub fn context_switched(&self) -> bool
pub fn context_switched(&self) -> bool
Check if context switch was successful
Sourcepub fn switched_to_context(&self) -> Option<String>
pub fn switched_to_context(&self) -> Option<String>
Get the name of the context that was switched to
Source§impl CommandOutput
impl CommandOutput
Sourcepub fn stdout_lines(&self) -> Vec<&str>
pub fn stdout_lines(&self) -> Vec<&str>
Get stdout lines as a vector
Sourcepub fn stderr_lines(&self) -> Vec<&str>
pub fn stderr_lines(&self) -> Vec<&str>
Get stderr lines as a vector
Sourcepub fn stdout_is_empty(&self) -> bool
pub fn stdout_is_empty(&self) -> bool
Check if stdout is empty
Sourcepub fn stderr_is_empty(&self) -> bool
pub fn stderr_is_empty(&self) -> bool
Check if stderr is empty
Trait Implementations§
Source§impl Clone for CommandOutput
impl Clone for CommandOutput
Source§fn clone(&self) -> CommandOutput
fn clone(&self) -> CommandOutput
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CommandOutput
impl Debug for CommandOutput
Source§impl From<CommandOutput> for NetworkConnectResult
impl From<CommandOutput> for NetworkConnectResult
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Source§impl From<CommandOutput> for NetworkCreateResult
impl From<CommandOutput> for NetworkCreateResult
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Source§impl From<CommandOutput> for NetworkDisconnectResult
impl From<CommandOutput> for NetworkDisconnectResult
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Source§impl From<CommandOutput> for NetworkInspectOutput
impl From<CommandOutput> for NetworkInspectOutput
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Source§impl From<CommandOutput> for NetworkLsOutput
impl From<CommandOutput> for NetworkLsOutput
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Source§impl From<CommandOutput> for NetworkPruneResult
impl From<CommandOutput> for NetworkPruneResult
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Source§impl From<CommandOutput> for NetworkRmResult
impl From<CommandOutput> for NetworkRmResult
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Source§impl From<CommandOutput> for VolumeCreateResult
impl From<CommandOutput> for VolumeCreateResult
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Source§impl From<CommandOutput> for VolumeInspectOutput
impl From<CommandOutput> for VolumeInspectOutput
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Source§impl From<CommandOutput> for VolumeLsOutput
impl From<CommandOutput> for VolumeLsOutput
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Source§impl From<CommandOutput> for VolumePruneResult
impl From<CommandOutput> for VolumePruneResult
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Source§impl From<CommandOutput> for VolumeRmResult
impl From<CommandOutput> for VolumeRmResult
Source§fn from(output: CommandOutput) -> Self
fn from(output: CommandOutput) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CommandOutput
impl RefUnwindSafe for CommandOutput
impl Send for CommandOutput
impl Sync for CommandOutput
impl Unpin for CommandOutput
impl UnwindSafe for CommandOutput
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