diff options
author | Florian Klink <flokli@flokli.de> | 2023-01-29T16·17+0100 |
---|---|---|
committer | flokli <flokli@flokli.de> | 2023-01-30T09·45+0000 |
commit | 9c18888715ffb41806017190ac66037709215b4b (patch) | |
tree | 86164bc0f9739ce2bd41578b7c9ec6e3b9ab5957 /tvix/store/src/proto.rs | |
parent | 42d3c06988cf39f247e66ff68d624d91b39656ad (diff) |
docs(tvix/store/protos): add docstring for Directory::digest() r/5778
Change-Id: I361dbca444a267fea28cd212d563ee2d03497c16 Reviewed-on: https://cl.tvl.fyi/c/depot/+/7952 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/store/src/proto.rs')
-rw-r--r-- | tvix/store/src/proto.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tvix/store/src/proto.rs b/tvix/store/src/proto.rs index 706041d6a3c3..0b4e11bebf89 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<u8> { let mut hasher = blake3::Hasher::new(); |