From 9c18888715ffb41806017190ac66037709215b4b Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sun, 29 Jan 2023 17:17:16 +0100 Subject: docs(tvix/store/protos): add docstring for Directory::digest() Change-Id: I361dbca444a267fea28cd212d563ee2d03497c16 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7952 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/store/src/proto.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tvix/store/src/proto.rs b/tvix/store/src/proto.rs index 706041d6a3..0b4e11bebf 100644 --- a/tvix/store/src/proto.rs +++ b/tvix/store/src/proto.rs @@ -189,6 +189,8 @@ impl Directory { .fold(0, |acc: u32, e| (acc + 1 + e.size) as u32) } + /// Calculates the digest of a Directory, which is the blake3 hash of a + /// Directory protobuf message, serialized in protobuf canonical form. pub fn digest(&self) -> Vec { let mut hasher = blake3::Hasher::new(); -- cgit 1.4.1