pub struct ComposeDownCommand { /* private fields */ }
Expand description
Docker Compose down command builder
Implementations§
Source§impl ComposeDownCommand
impl ComposeDownCommand
Sourcepub fn with_config(config: ComposeConfig) -> Self
pub fn with_config(config: ComposeConfig) -> Self
Create with a specific compose configuration
Sourcepub fn remove_images(self, policy: RemoveImages) -> Self
pub fn remove_images(self, policy: RemoveImages) -> Self
Remove images (all or local)
Sourcepub fn remove_orphans(self) -> Self
pub fn remove_orphans(self) -> Self
Remove containers for services not defined in the compose file
Sourcepub fn project_name(self, name: impl Into<String>) -> Self
pub fn project_name(self, name: impl Into<String>) -> Self
Set project name
Sourcepub async fn run(&self) -> Result<ComposeDownResult>
pub async fn run(&self) -> Result<ComposeDownResult>
Execute the compose down command
§Errors
Returns an error if:
- Docker Compose is not installed
- Compose file is not found
- Container stop/removal fails
Trait Implementations§
Source§impl Clone for ComposeDownCommand
impl Clone for ComposeDownCommand
Source§fn clone(&self) -> ComposeDownCommand
fn clone(&self) -> ComposeDownCommand
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 ComposeCommand for ComposeDownCommand
impl ComposeCommand for ComposeDownCommand
Source§type Output = ComposeOutput
type Output = ComposeOutput
The output type this command produces
Source§fn subcommand(&self) -> &'static str
fn subcommand(&self) -> &'static str
Get the compose subcommand name (e.g., “up”, “down”, “ps”)
Source§fn build_args(&self) -> Vec<String>
fn build_args(&self) -> Vec<String>
Build command-specific arguments
Source§fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute the command
Source§fn config(&self) -> &ComposeConfig
fn config(&self) -> &ComposeConfig
Get the compose configuration
Source§impl Debug for ComposeDownCommand
impl Debug for ComposeDownCommand
Auto Trait Implementations§
impl Freeze for ComposeDownCommand
impl RefUnwindSafe for ComposeDownCommand
impl Send for ComposeDownCommand
impl Sync for ComposeDownCommand
impl Unpin for ComposeDownCommand
impl UnwindSafe for ComposeDownCommand
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