From cc26357c68f9f05f8946bf6746abecb6b848dbe7 Mon Sep 17 00:00:00 2001 From: Peter Huene Date: Fri, 1 Dec 2023 17:31:11 -0800 Subject: [PATCH] Make `download_content` public in `Client`. --- crates/client/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index f4d91397..1a8fa77b 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -601,7 +601,11 @@ impl Client { Ok(record) } - async fn download_content(&self, digest: &AnyHash) -> Result { + /// Downloads the content for the specified digest into client storage. + /// + /// If the content already exists in client storage, the existing path + /// is returned. + pub async fn download_content(&self, digest: &AnyHash) -> Result { match self.content.content_location(digest) { Some(path) => { tracing::info!("content for digest `{digest}` already exists in storage");