[pbs-devel] applied: [PATCH v3 proxmox 1/1] updater: impl UpdaterType for Vec

Dietmar Maurer dietmar at proxmox.com
Tue Nov 9 09:31:12 CET 2021


applied

On 10/28/21 3:00 PM, Fabian Grünbichler wrote:
> 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 at proxmox.com>
> Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
> ---
>   proxmox-schema/src/schema.rs | 5 +++++
>   1 file changed, 5 insertions(+)
>
> diff --git a/proxmox-schema/src/schema.rs b/proxmox-schema/src/schema.rs
> index 34135f4..5e6e818 100644
> --- a/proxmox-schema/src/schema.rs
> +++ b/proxmox-schema/src/schema.rs
> @@ -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;
>   }





More information about the pbs-devel mailing list