From 7c00ec904d839170b025f9d94d98e9ea28b8596d Mon Sep 17 00:00:00 2001 From: Christian Ebner Date: Tue, 26 Sep 2023 11:28:55 +0200 Subject: [PATCH] specs: add backup detection mode specification Adds the specification for switching the detection mode used to identify regular files which changed since a reference backup run. Signed-off-by: Christian Ebner --- pbs-client/src/backup_specification.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/pbs-client/src/backup_specification.rs b/pbs-client/src/backup_specification.rs index 619a3a9d..66bf7196 100644 --- a/pbs-client/src/backup_specification.rs +++ b/pbs-client/src/backup_specification.rs @@ -1,4 +1,5 @@ use anyhow::{bail, Error}; +use serde::{Deserialize, Serialize}; use proxmox_schema::*; @@ -45,3 +46,28 @@ pub fn parse_backup_specification(value: &str) -> Result bool { + matches!(self, Self::Data) + } + /// Selected mode is metadata based file change detection + pub fn is_metadata(&self) -> bool { + matches!(self, Self::Metadata) + } +}