Function iroh_blobs::get::db::get_to_db
source · pub async fn get_to_db<D: BaoStore, C: FnOnce() -> F, F: Future<Output = Result<Connection>>>(
db: &D,
get_conn: C,
hash_and_format: &HashAndFormat,
progress_sender: impl ProgressSender<Msg = DownloadProgress> + IdGenerator
) -> Result<Stats, GetError>
Expand description
Get a blob or collection into a store.
This considers data that is already in the store, and will only request the remaining data.
Progress is reported as DownloadProgress
through a ProgressSender
. Note that the
DownloadProgress::AllDone
event is not emitted from here, but left to an upper layer to send,
if desired.