pub fn update(cfg: &Config, opts: UpdateOpts) -> Result<UpdateReport, PkgError>Expand description
Refresh deps and bump tag pins as appropriate, then re-install.
Walks [deps] (or just opts.name), classifies each entry via the
decision table below, and — unless opts.dry_run — applies the
changes:
| dep pin | force | outcome |
|---|---|---|
rev = "..." | any | Skipped("rev pin") |
branch = "..." | any | Refresh |
tag = "...", exact | false | Skipped("exact tag pin …") |
tag = "...", exact | true | TagBumped (or Skipped("already at …")) |
tag = "...", prefix | any | PrefixResolved (or Skipped("no match")) |
tag = "...", junk | any | Skipped("tag '…' is not SemVer") |
| no pin | any | Refresh |
TagBumped rewrites the manifest’s tag value in place through
toml_edit (comments / key order preserved). Anything other than
Skipped triggers a full install afterwards.
§Errors
PkgError::UnknownDepwhenopts.nameis not in[deps].PkgError::ManifestEditwhen the manifest cannot be re-parsed or the[deps.<name>]table is not editable.- Anything
installcan return.