pub trait DockerOperations: Send + Sync {
// Required methods
fn create_exec<'life0, 'life1, 'async_trait>(
&'life0 self,
container_id: &'life1 str,
options: CreateExecOptions<String>,
) -> Pin<Box<dyn Future<Output = Result<CreateExecResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn start_exec<'life0, 'life1, 'async_trait>(
&'life0 self,
exec_id: &'life1 str,
options: Option<StartExecOptions>,
) -> Pin<Box<dyn Future<Output = Result<StartExecResults>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn inspect_exec<'life0, 'life1, 'async_trait>(
&'life0 self,
exec_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExecInspectResponse>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Trait for Docker exec operations.
Enables mocking in tests to verify error handling without Docker failures. Uses async-trait for dyn dispatch (Rust async fn in traits doesn’t support dyn yet).
Required Methods§
Sourcefn create_exec<'life0, 'life1, 'async_trait>(
&'life0 self,
container_id: &'life1 str,
options: CreateExecOptions<String>,
) -> Pin<Box<dyn Future<Output = Result<CreateExecResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_exec<'life0, 'life1, 'async_trait>(
&'life0 self,
container_id: &'life1 str,
options: CreateExecOptions<String>,
) -> Pin<Box<dyn Future<Output = Result<CreateExecResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create an exec instance in a container.
Sourcefn start_exec<'life0, 'life1, 'async_trait>(
&'life0 self,
exec_id: &'life1 str,
options: Option<StartExecOptions>,
) -> Pin<Box<dyn Future<Output = Result<StartExecResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start_exec<'life0, 'life1, 'async_trait>(
&'life0 self,
exec_id: &'life1 str,
options: Option<StartExecOptions>,
) -> Pin<Box<dyn Future<Output = Result<StartExecResults>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Start an exec instance.
Sourcefn inspect_exec<'life0, 'life1, 'async_trait>(
&'life0 self,
exec_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExecInspectResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn inspect_exec<'life0, 'life1, 'async_trait>(
&'life0 self,
exec_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<ExecInspectResponse>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Inspect an exec instance to get exit code.