[pbs-devel] [RFC v2 proxmox-backup 09/23] fix #3174: index: add fn digest for DynamicEntry

Christian Ebner c.ebner at proxmox.com
Mon Oct 9 13:51:25 CEST 2023


Signed-off-by: Christian Ebner <c.ebner at proxmox.com>
---
Changes since version 1:
no changes

 pbs-datastore/src/dynamic_index.rs | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pbs-datastore/src/dynamic_index.rs b/pbs-datastore/src/dynamic_index.rs
index 11b8381d..71439ef2 100644
--- a/pbs-datastore/src/dynamic_index.rs
+++ b/pbs-datastore/src/dynamic_index.rs
@@ -72,6 +72,11 @@ impl DynamicEntry {
     pub fn end(&self) -> u64 {
         u64::from_le(self.end_le)
     }
+
+    #[inline]
+    pub fn digest(&self) -> [u8; 32] {
+        self.digest.clone()
+    }
 }
 
 pub struct DynamicIndexReader {
-- 
2.39.2






More information about the pbs-devel mailing list