Skip to main content

apply_update

Function apply_update 

Source
pub fn apply_update(target_dir: &Path) -> Result<ApplyResult, ApplyError>
Expand description

Apply rust-bucket to a target directory in update mode (subsequent runs).

Implements the update flow described in ARCHITECTURE.md.

§Arguments

  • target_dir - The target directory to update rust-bucket files in

§Errors

Returns ApplyError if:

  • The target is not a Rust crate (no Cargo.toml)
  • The target is not a git repository (no .git/)
  • The rust-bucket.toml config file cannot be loaded
  • Any step in the process fails (config save, template extraction, rendering, verification)