Skip to main content

scaffold

Function scaffold 

Source
pub fn scaffold(
    dir: &Path,
    name: &str,
    idempotency_key: Option<&str>,
) -> Result<Scaffolded, CliError>
Expand description

Refuses if <dir>/<name> already exists, so new never overwrites a caller’s own work. An idempotency_key is recorded beside the composition and answers the same Scaffolded again when the same key is retried over a tree still holding exactly this scaffold, so a network retry or an agent restart converges rather than erroring.