updater: impl UpdaterType for Vec

by replacing the whole Vec.

if we ever want to support adding/removing/modifying elements of a Vec
via the Updater, we'd need to extend it anyway (or use a custom
updater).

Suggested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
Fabian Grünbichler 2021-10-28 15:00:47 +02:00 committed by Dietmar Maurer
parent bc38ff7878
commit 4128c5fdb5

View File

@ -1179,6 +1179,11 @@ where
type Updater = T::Updater;
}
// this will replace the whole Vec
impl<T> UpdaterType for Vec<T> {
type Updater = Option<Self>;
}
pub trait ApiType {
const API_SCHEMA: Schema;
}