pub fn walk<
    T: Send + 'static,
    F: Fn(
        &Store,
        &PathBuf,
        Digest,
        &bazel_protos::remote_execution::Directory,
      ) -> BoxFuture<T, String>
      + Send
      + Sync
      + 'static,
  >(
    &self,
    digest: Digest,
    f: F,
  ) -> BoxFuture<Vec<T>, String> {
    let f = Arc::new(f);
    let accumulator = Arc::new(Mutex::new(Vec::new()));
    self
      .walk_helper(digest, PathBuf::new(), f, accumulator.clone())
      .map(|()| {
        Arc::try_unwrap(accumulator)
          .unwrap_or_else(|_| panic!("walk_helper violated its contract."))
          .into_inner()
      })
      .to_boxed()
  }
///
/// Given the Digest for a Directory, recursively walk the Directory, calling the given function
/// with the path so far, and the new Directory.
///
/// The recursive walk will proceed concurrently, so if order matters, a caller should sort the
/// output after the call.
///
Given the Digest for a Directory, recursively walk the Directory, calling the given function
with the path so far, and the new Directory.

The recursive walk will proceed concurrently, so if order matters, a caller should sort the
output after the call.
Given the Digest for a Directory recursively walk the Directory calling the given function with the path so far and the new Directory . The recursive walk will proceed concurrently so if order matters a caller should sort the output after the call .
pub fn walk<
    T: Send + 'static,
    F: Fn(
        &Store,
        &PathBuf,
        Digest,
        &bazel_protos::remote_execution::Directory,
      ) -> BoxFuture<T, String>
      + Send
      + Sync
      + 'static,
  >(
    &self,
    digest: Digest,
    f: F,
  ) -> BoxFuture<Vec<T>, String> {
    let f = Arc::new(f);
    let accumulator = Arc::new(Mutex::new(Vec::new()));
    self
      .walk_helper(digest, PathBuf::new(), f, accumulator.clone())
      .map(|()| {
        Arc::try_unwrap(accumulator)
          .unwrap_or_else(|_| panic!("walk_helper violated its contract."))
          .into_inner()
      })
      .to_boxed()
  }
pub fn walk < T : Send + ' static , F : Fn ( & Store , & PathBuf , Digest , & bazel_protos :: remote_execution :: Directory , ) -> BoxFuture < T , String > + Send + Sync + ' static , > ( & self , digest : Digest , f : F , ) -> BoxFuture < Vec < T > , String > { let f = Arc :: new ( f ) ; let accumulator = Arc :: new ( Mutex :: new ( Vec :: new ( ) ) ) ; self . walk_helper ( digest , PathBuf :: new ( ) , f , accumulator . clone ( ) ) . map ( | ( ) | { Arc :: try_unwrap ( accumulator ) . unwrap_or_else ( | _ | panic ! ( " " ) ) . into_inner ( ) } ) . to_boxed ( ) }
Given the Digest for a Directory, recursively walk the Directory, calling the given function
with the path so far, and the new Directory.
Given the Digest for a Directory recursively walk the Directory calling the given function with the path so far and the new Directory .
&self
digest
Digest
f
F
&self
digest
Digest
f
F