pub async fn fulfill_meta_far_blob(
    index: &Arc<Mutex<PackageIndex>>,
    blobfs: &blobfs::Client,
    meta_hash: Hash,
) -> Result<HashSet<Hash>, FulfillMetaFarError> {
    let (path, content_blobs) = crate::index::enumerate_package_blobs(blobfs, &meta_hash)
        .await?
        .ok_or_else(|| FulfillMetaFarError::BlobNotFound(meta_hash))?;

    let () = index.lock().await.fulfill_meta_far(meta_hash, path, content_blobs.clone())?;

    Ok(content_blobs)
}
/// Notifies the appropriate inner indices that the given meta far blob is now available in blobfs.
/// Do not use this for regular blob (unless it's also a meta far).
Notifies the appropriate inner indices that the given meta far blob is now available in blobfs.
Do not use this for regular blob (unless it's also a meta far).
Notifies the appropriate inner indices that the given meta far blob is now available in blobfs . Do not use this for regular blob ( unless it ' s also a meta far ) .
pub async fn fulfill_meta_far_blob(
    index: &Arc<Mutex<PackageIndex>>,
    blobfs: &blobfs::Client,
    meta_hash: Hash,
) -> Result<HashSet<Hash>, FulfillMetaFarError> {
    let (path, content_blobs) = crate::index::enumerate_package_blobs(blobfs, &meta_hash)
        .await?
        .ok_or_else(|| FulfillMetaFarError::BlobNotFound(meta_hash))?;
    let () = index.lock().await.fulfill_meta_far(meta_hash, path, content_blobs.clone())?;
    Ok(content_blobs)
}
pub async fn fulfill_meta_far_blob ( index : & Arc < Mutex < PackageIndex > > , blobfs : & blobfs :: Client , meta_hash : Hash , ) -> Result < HashSet < Hash > , FulfillMetaFarError > { let ( path , content_blobs ) = crate :: index :: enumerate_package_blobs ( blobfs , & meta_hash ) . await ? . ok_or_else ( | | FulfillMetaFarError :: BlobNotFound ( meta_hash ) ) ? ; let ( ) = index . lock ( ) . await . fulfill_meta_far ( meta_hash , path , content_blobs . clone ( ) ) ? ; Ok ( content_blobs ) }
Notifies the appropriate inner indices that the given meta far blob is now available in blobfs.
Notifies the appropriate inner indices that the given meta far blob is now available in blobfs .
index
&Arc<Mutex<PackageIndex>>
blobfs
&blobfs::Client
meta_hash
Hash
index
&Arc<Mutex<PackageIndex>>
blobfs
&blobfs::Client
meta_hash
Hash