use std::path::Path;
use typed_builder::TypedBuilder;
use super::ComposeService;
use crate::{ExposedPort, WaitStrategy};
#[derive(Debug, Clone, TypedBuilder)]
#[builder(field_defaults(setter(prefix = "with_")))]
#[non_exhaustive]
pub struct RunnableComposeContainers<P> {
pub(crate) compose_path: P,
#[builder(default, setter(transform = |args: impl IntoIterator<Item = (impl Into<ComposeService>, impl Into<WaitStrategy>)>| args.into_iter().map(|(key, value)| (key.into(), value.into())).collect()))]
pub(crate) wait_strategies: Vec<(ComposeService, WaitStrategy)>,
#[builder(default, setter(transform = |args: impl IntoIterator<Item = (impl Into<ComposeService>, ExposedPort)>| args.into_iter().map(|(key, value)| (key.into(), value)).collect()))]
pub(crate) port_mappings: Vec<(ComposeService, ExposedPort)>,
}
pub trait ToRunnableComposeContainers {
type AsPath: AsRef<Path>;
fn to_runnable(
&self,
builder: RunnableComposeContainersBuilder<Self::AsPath>,
) -> RunnableComposeContainers<Self::AsPath>;
}