[PATCH proxmox v3 03/38] schema: implement UpdaterType for HashMap and BTreeMap

Christoph Heiss
2026-04-03T16:55:04Z

proxmox-schema/src/schema.rs | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/proxmox-schema/src/schema.rs b/proxmox-schema/src/schema.rs
index 24815bdb..cff868db 100644
--- a/proxmox-schema/src/schema.rs
+++ b/proxmox-schema/src/schema.rs
@@ -4,7 +4,7 @@
//! completely static API definitions that can be included within the programs read-only text
//! segment.

-use std::collections::HashSet;
+use std::collections::{BTreeMap, HashMap, HashSet};
use std::fmt;

use anyhow::{bail, format_err, Error};
@@ -2139,6 +2139,14 @@ impl<T> UpdaterType for crate::property_string::PropertyString<T> {
type Updater = Option<Self>;
}

+impl<K, V> UpdaterType for HashMap<K, V> {
+ type Updater = Option<Self>;
+}
+
+impl<K, V> UpdaterType for BTreeMap<K, V> {
+ type Updater = Option<Self>;
+}
+
/// Trait signifying that a type contains an API schema.
pub trait ApiType {
const API_SCHEMA: Schema;
--
2.53.0