From 591edf0d5b5e4910f0a4688028348e423d723253 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 19 Mar 2024 12:54:19 +0200 Subject: docs(tvix/castore/directory): update docstring for get_recursive The rust trait was missing to document the order of the elements in the stream. Document that, and also the reasoning behind this. Change-Id: I27ef0b2020082783fc41c2015233175e2b8e716d Reviewed-on: https://cl.tvl.fyi/c/depot/+/11203 Reviewed-by: raitobezarius Autosubmit: flokli Tested-by: BuildkiteCI --- tvix/castore/src/directoryservice/mod.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tvix/castore/src/directoryservice/mod.rs b/tvix/castore/src/directoryservice/mod.rs index 8a10121d6d..ca8e60e873 100644 --- a/tvix/castore/src/directoryservice/mod.rs +++ b/tvix/castore/src/directoryservice/mod.rs @@ -44,7 +44,10 @@ pub trait DirectoryService: Send + Sync { /// Rust doesn't support this as a generic in traits yet. This is the same thing that /// [async_trait] generates, but for streams instead of futures. /// - /// The individual Directory messages *must* be valid. + /// The individually returned Directory messages *must* be valid. + /// Directories are sent in an order from the root to the leaves, so that + /// the receiving side can validate each message to be a connected to the root + /// that has initially been requested. fn get_recursive( &self, root_directory_digest: &B3Digest, -- cgit 1.4.1