pub struct DockerCli { /* private fields */ }Expand description
Runs the docker CLI (with the Compose plugin). It honours DOCKER_HOST and the current
Docker context like the CLI does; with_context pins one.
Implementations§
Trait Implementations§
Source§impl ComposeEngine for DockerCli
impl ComposeEngine for DockerCli
Source§fn up<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dir: &'life1 Path,
opts: &'life2 UpOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn up<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dir: &'life1 Path,
opts: &'life2 UpOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Create and start the project in
dir (docker compose up -d).Source§fn down<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dir: &'life1 Path,
opts: &'life2 DownOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn down<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
dir: &'life1 Path,
opts: &'life2 DownOptions,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Stop and remove the project in
dir (docker compose down).Source§fn ls<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ProjectStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ls<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ProjectStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Every project Docker knows of, running or stopped (
docker compose ls --all).Source§fn ps<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn ps<'life0, 'life1, 'async_trait>(
&'life0 self,
project: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ServiceStatus>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
The containers of
project, running or stopped (docker compose ps --all).Source§fn logs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
opts: &'life2 LogOptions,
) -> Pin<Box<dyn Future<Output = Result<EngineStream<LogLine>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn logs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
project: &'life1 str,
opts: &'life2 LogOptions,
) -> Pin<Box<dyn Future<Output = Result<EngineStream<LogLine>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
The log lines of
project’s containers (docker compose logs --timestamps).Source§fn events<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 EventFilter,
) -> Pin<Box<dyn Future<Output = Result<EngineStream<EngineEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn events<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 EventFilter,
) -> Pin<Box<dyn Future<Output = Result<EngineStream<EngineEvent>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Container events of the projects
filter picks, from now on (docker events).Source§fn network_rm<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn network_rm<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Remove the network
name; Ok(false) when it doesn’t exist or is still in use.Auto Trait Implementations§
impl Forget for DockerCli
impl Freeze for DockerCli
impl RefUnwindSafe for DockerCli
impl Send for DockerCli
impl Sync for DockerCli
impl Unpin for DockerCli
impl UnsafeUnpin for DockerCli
impl UnwindSafe for DockerCli
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