pub struct VenvOwners {
pub owners: BTreeSet<String>,
}Expand description
The set of plugins that currently claim a shared venv.
Persisted rather than held in memory because co-owners can live in different
processes (a gateway and a cpex CLI invocation against the same
plugins/ tree), and an in-memory set would not see the other side.
A BTreeSet keeps the on-disk order stable, so the file does not churn.
Fields§
§owners: BTreeSet<String>Full class names of the plugins claiming this venv.
Implementations§
Source§impl VenvOwners
impl VenvOwners
Sourcepub fn load(path: &Path) -> Self
pub fn load(path: &Path) -> Self
Read the registry, treating an absent or corrupt file as empty.
Absent is the common case (a venv this host has never built). Corrupt is treated the same way deliberately: the registry is an optimization for not deleting a venv, so failing open to “no recorded owners” preserves the pre-existing rebuild behavior rather than wedging startup on an unparseable file.
Sourcepub fn has_other_owner(&self, class_name: &str) -> bool
pub fn has_other_owner(&self, class_name: &str) -> bool
Whether anyone other than class_name claims this venv.