Trait contain_rs::Handle
source · pub trait Handle {
// Required methods
fn run(&self) -> Result<(), ContainersError>;
fn wait(&self) -> Result<(), ContainersError>;
fn run_and_wait(&self) -> Result<(), ContainersError>;
fn stop(&self) -> Result<(), ContainersError>;
fn rm(&self) -> Result<(), ContainersError>;
fn log(&self) -> Result<Option<Log>, ContainersError>;
fn container(&self) -> &Container;
fn is_running(&self) -> Result<bool, ContainersError>;
fn exists(&self) -> Result<bool, ContainersError>;
}
Expand description
A handle is a way to interact with a container.
When you create a container using a Client it will return one of these. The handle automatically stops and removes the container, when it goes out of scope.