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 <tazjin@tvl.su>
This commit is contained in:
parent
42d3c06988
commit
9c18888715
1 changed files with 2 additions and 0 deletions
|
@ -189,6 +189,8 @@ impl Directory {
|
||||||
.fold(0, |acc: u32, e| (acc + 1 + e.size) as u32)
|
.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> {
|
pub fn digest(&self) -> Vec<u8> {
|
||||||
let mut hasher = blake3::Hasher::new();
|
let mut hasher = blake3::Hasher::new();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue