pub trait CliLifecycle: LifecycleService {
type CreateArgs: Args + CreateArgsLike + Send + Sync;
// Required method
fn resolve<'life0, 'async_trait>(
args: &'life0 Self::CreateArgs,
non_interactive: bool,
) -> Pin<Box<dyn Future<Output = Result<(Self::Cfg, Self::Secrets)>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
CLI-side extension of the library’s LifecycleService. Adds the
clap-derived CreateArgs shape and the interactive resolve step.
Implementors live in cli/service_<name>.rs alongside their
LifecycleService impl.
Required Associated Types§
Sourcetype CreateArgs: Args + CreateArgsLike + Send + Sync
type CreateArgs: Args + CreateArgsLike + Send + Sync
Per-service zad service create <name> flag struct. Must
embed CreateArgsBase via #[command(flatten)] and expose
it through CreateArgsLike::base.
Required Methods§
Sourcefn resolve<'life0, 'async_trait>(
args: &'life0 Self::CreateArgs,
non_interactive: bool,
) -> Pin<Box<dyn Future<Output = Result<(Self::Cfg, Self::Secrets)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn resolve<'life0, 'async_trait>(
args: &'life0 Self::CreateArgs,
non_interactive: bool,
) -> Pin<Box<dyn Future<Output = Result<(Self::Cfg, Self::Secrets)>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Build (Cfg, Secrets) from CLI args. Interactive mode prompts
for any Option<_> fields that arrived empty; non-interactive
mode returns ZadError::MissingRequired for anything still
missing.
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.