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§
Sourcefn get_config(&self) -> &ComposeConfig
fn get_config(&self) -> &ComposeConfig
Get the compose configuration
Sourcefn get_config_mut(&mut self) -> &mut ComposeConfig
fn get_config_mut(&mut self) -> &mut ComposeConfig
Get mutable compose configuration for builder pattern
Sourcefn subcommand(&self) -> &'static str
fn subcommand(&self) -> &'static str
Get the compose subcommand name (e.g., “up”, “down”, “ps”)
Sourcefn build_subcommand_args(&self) -> Vec<String>
fn build_subcommand_args(&self) -> Vec<String>
Build command-specific arguments (without global compose args)
Provided Methods§
Sourcefn build_command_args(&self) -> Vec<String>
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)
Sourcefn file<P: Into<PathBuf>>(self, file: P) -> Selfwhere
Self: Sized,
fn file<P: Into<PathBuf>>(self, file: P) -> Selfwhere
Self: Sized,
Helper builder methods for common compose config options
Sourcefn project_name(self, name: impl Into<String>) -> Selfwhere
Self: Sized,
fn project_name(self, name: impl Into<String>) -> Selfwhere
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".