Expand description
Error types for docker-wrapper.
All commands return Result<T, Error>. Match on specific error variants
for detailed handling:
use docker_wrapper::{DockerCommand, RunCommand, Error};
match RunCommand::new("nginx").execute().await {
Ok(id) => println!("Started: {}", id.short()),
Err(Error::DockerNotFound) => eprintln!("Docker is not installed"),
Err(Error::DaemonNotRunning) => eprintln!("Start the Docker daemon"),
Err(Error::CommandFailed { stderr, .. }) => eprintln!("Failed: {}", stderr),
Err(e) => eprintln!("Error: {}", e),
}Enums§
- Error
- Main error type for all docker-wrapper operations
Type Aliases§
- Result
- Result type for docker-wrapper operations