pub trait ComposeCommand {
type Output;
// Required methods
fn subcommand(&self) -> &'static str;
fn build_args(&self) -> Vec<String>;
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 config(&self) -> &ComposeConfig;
}
Expand description
Common trait for all compose commands (existing pattern)
Required Associated Types§
Required Methods§
Sourcefn subcommand(&self) -> &'static str
fn subcommand(&self) -> &'static str
Get the compose subcommand name (e.g., “up”, “down”, “ps”)
Sourcefn build_args(&self) -> Vec<String>
fn build_args(&self) -> Vec<String>
Build command-specific arguments
Sourcefn 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
Sourcefn config(&self) -> &ComposeConfig
fn config(&self) -> &ComposeConfig
Get the compose configuration