//! Version management for node registries.
usealloc::collections::BTreeMap;/// A version set maps node IDs to their schema versions.
////// Aggregating crates use this to pin the API surface:
/// "in API v3, `zenfilters.exposure` uses schema v2".
#[derive(Clone, Debug, Default)]pubstructVersionSet{versions:BTreeMap<&'staticstr, u32>,
/// The public-facing API version number that users see.
pubapi_version:u32,
}implVersionSet{/// Create a new version set for the given API version.
pubfnnew(api_version:u32)->Self{Self{
versions:BTreeMap::new(),
api_version,}}/// Set the schema version for a node ID.
pubfnset(&mutself, id:&'staticstr, version:u32){self.versions.insert(id, version);}/// Get the schema version for a node ID.
pubfnget(&self, id:&str)->Option<u32>{self.versions.get(id).copied()}}