pub fn fulfill_meta_far(
        &mut self,
        package_hash: Hash,
        package_path: PackagePath,
        required_blobs: HashSet<Hash>,
    ) -> Result<(), FulfillNotNeededBlobError> {
        if let Some(wrong_state) = match self.packages.get(&package_hash).map(|pwi| &pwi.package) {
            Some(Package::Pending) => None,
            None => Some("missing"),
            Some(Package::Active { .. }) => Some("Active"),
            Some(Package::WithMetaFar { .. }) => Some("WithMetaFar"),
        } {
            return Err(FulfillNotNeededBlobError { hash: package_hash, state: wrong_state });
        }

        self.add_package(package_hash, Package::WithMetaFar { path: package_path, required_blobs });

        Ok(())
    }
/// Notifies dynamic index that the given package's meta far is now present in blobfs,
/// providing the meta far's internal name and set of content blobs it references.
Notifies dynamic index that the given package's meta far is now present in blobfs,
providing the meta far's internal name and set of content blobs it references.
Notifies dynamic index that the given package ' s meta far is now present in blobfs providing the meta far ' s internal name and set of content blobs it references .
pub fn fulfill_meta_far(
        &mut self,
        package_hash: Hash,
        package_path: PackagePath,
        required_blobs: HashSet<Hash>,
    ) -> Result<(), FulfillNotNeededBlobError> {
        if let Some(wrong_state) = match self.packages.get(&package_hash).map(|pwi| &pwi.package) {
            Some(Package::Pending) => None,
            None => Some("missing"),
            Some(Package::Active { .. }) => Some("Active"),
            Some(Package::WithMetaFar { .. }) => Some("WithMetaFar"),
        } {
            return Err(FulfillNotNeededBlobError { hash: package_hash, state: wrong_state });
        }
        self.add_package(package_hash, Package::WithMetaFar { path: package_path, required_blobs });
        Ok(())
    }
pub fn fulfill_meta_far ( & mut self , package_hash : Hash , package_path : PackagePath , required_blobs : HashSet < Hash > , ) -> Result < ( ) , FulfillNotNeededBlobError > { if let Some ( wrong_state ) = match self . packages . get ( & package_hash ) . map ( | pwi | & pwi . package ) { Some ( Package :: Pending ) => None , None => Some ( " " ) , Some ( Package :: Active { .. } ) => Some ( " " ) , Some ( Package :: WithMetaFar { .. } ) => Some ( " " ) , } { return Err ( FulfillNotNeededBlobError { hash : package_hash , state : wrong_state } ) ; } self . add_package ( package_hash , Package :: WithMetaFar { path : package_path , required_blobs } ) ; Ok ( ( ) ) }
Notifies dynamic index that the given package's meta far is now present in blobfs,
providing the meta far's internal name and set of content blobs it references.
Notifies dynamic index that the given package ' s meta far is now present in blobfs providing the meta far ' s internal name and set of content blobs it references .
&mut self
package_hash
Hash
package_path
PackagePath
required_blobs
HashSet<Hash>
&mut self
package_hash
Hash
package_path
PackagePath
required_blobs
HashSet<Hash>