pub fn read_release_declaration(path: &Path) -> Result<Declaration>Expand description
What one repository declares that it publishes.
The library form of onevcs release declaration, and the producer half of the
release contract: release_targets answers what this host waits on for a
repository, and this answers what the repository itself says it publishes. The
two are different documents on purpose — see declaration — and deciding
between them is nobody’s job here.
path is either a repository’s root or the release-targets.toml in it. A
repository carrying no declaration is refused rather than answered with an empty
one: “this repository publishes nothing” and “nobody has said what this
repository publishes” are different answers, and a consumer that waits on a
release acts differently on each.
It takes no Providers for the reason release_targets does not: a
declaration is a file in a checkout, and there is nothing here for an
implementation of either interface to answer.