From f15601f1c9879df6b09cac325c9f85889f57a6be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Mon, 16 May 2022 13:31:49 +0200 Subject: [PATCH] BackupDir: add group/dir accessors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit for getting the respective api type references for convenient printing/logging. Signed-off-by: Fabian Grünbichler --- pbs-datastore/src/backup_info.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pbs-datastore/src/backup_info.rs b/pbs-datastore/src/backup_info.rs index 35ab0608..c8ceccd5 100644 --- a/pbs-datastore/src/backup_info.rs +++ b/pbs-datastore/src/backup_info.rs @@ -369,6 +369,14 @@ impl BackupDir { &self.backup_time_string } + pub fn dir(&self) -> &pbs_api_types::BackupDir { + &self.dir + } + + pub fn group(&self) -> &pbs_api_types::BackupGroup { + &self.dir.group + } + pub fn relative_path(&self) -> PathBuf { let mut path = self.ns.path(); path.push(self.dir.group.ty.as_str());