pub fn read_workspace_self_pins(
contents: &str,
) -> (Option<String>, Vec<SelfPin>)Expand description
Extract [workspace.package] version and every local-path
[workspace.dependencies] self-pin (crate name + pinned version) from a
workspace Cargo.toml’s contents.
Read-only (20d / devflow release --check): asserts 20a’s invariant
(write_version keeps every self-pin equal to the workspace version)
without re-implementing TOML scanning — reuses the same
parse_section_header/find_version_in_contents/
workspace_dependency_has_local_path/inline_table_fragments helpers
write_version’s additive rewrite pass already uses.
Returns (workspace_version, pins). workspace_version is None when
the contents have no [workspace.package] version field (not a workspace
root Cargo.toml) — callers must treat that as “nothing to assert”, not a
drift.