pub struct CommandExecutor {
pub raw_args: Vec<String>,
pub platform_info: Option<PlatformInfo>,
}
Expand description
Common functionality for executing Docker commands
Fields§
§raw_args: Vec<String>
Additional raw arguments added via escape hatch
platform_info: Option<PlatformInfo>
Platform information for runtime abstraction
Implementations§
Source§impl CommandExecutor
impl CommandExecutor
Sourcepub fn with_platform() -> Result<Self>
pub fn with_platform() -> Result<Self>
Create a new command executor with platform detection
§Errors
Returns an error if platform detection fails
Sourcepub fn platform(self, platform_info: PlatformInfo) -> Self
pub fn platform(self, platform_info: PlatformInfo) -> Self
Set the platform information
Sourcepub async fn execute_command(
&self,
command_name: &str,
args: Vec<String>,
) -> Result<CommandOutput>
pub async fn execute_command( &self, command_name: &str, args: Vec<String>, ) -> Result<CommandOutput>
Execute a Docker command with the given arguments
§Errors
Returns an error if the Docker command fails to execute or returns a non-zero exit code
Sourcepub fn add_option(&mut self, key: &str, value: &str)
pub fn add_option(&mut self, key: &str, value: &str)
Add a key-value option
Trait Implementations§
Source§impl Clone for CommandExecutor
impl Clone for CommandExecutor
Source§fn clone(&self) -> CommandExecutor
fn clone(&self) -> CommandExecutor
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 CommandExecutor
impl Debug for CommandExecutor
Auto Trait Implementations§
impl Freeze for CommandExecutor
impl RefUnwindSafe for CommandExecutor
impl Send for CommandExecutor
impl Sync for CommandExecutor
impl Unpin for CommandExecutor
impl UnwindSafe for CommandExecutor
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