ComposeCommand

Trait ComposeCommand 

Source
pub trait ComposeCommand: DockerCommand {
    // Required methods
    fn get_config(&self) -> &ComposeConfig;
    fn get_config_mut(&mut self) -> &mut ComposeConfig;
    fn subcommand(&self) -> &'static str;
    fn build_subcommand_args(&self) -> Vec<String>;

    // Provided methods
    fn build_command_args(&self) -> Vec<String> { ... }
    fn file<P: Into<PathBuf>>(self, file: P) -> Self
       where Self: Sized { ... }
    fn project_name(self, name: impl Into<String>) -> Self
       where Self: Sized { ... }
}
Expand description

Extended trait for Docker Compose commands

Required Methods§

Source

fn get_config(&self) -> &ComposeConfig

Get the compose configuration

Source

fn get_config_mut(&mut self) -> &mut ComposeConfig

Get mutable compose configuration for builder pattern

Source

fn subcommand(&self) -> &'static str

Get the compose subcommand name (e.g., “up”, “down”, “ps”)

Source

fn build_subcommand_args(&self) -> Vec<String>

Build command-specific arguments (without global compose args)

Provided Methods§

Source

fn build_command_args(&self) -> Vec<String>

Build complete command arguments including “compose” and global args
(This provides the implementation for DockerCommandV2::build_command_args)

Source

fn file<P: Into<PathBuf>>(self, file: P) -> Self
where Self: Sized,

Helper builder methods for common compose config options

Source

fn project_name(self, name: impl Into<String>) -> Self
where Self: Sized,

Set project name for compose command

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§