async fn resolve_font<'a, A>(
    font_package_manager: &'a Arc<FontPackageManager>,
    rewrites: &'a Arc<RwLock<RewriteManager>>,
    repo_manager: &'a Arc<RwLock<RepositoryManager<A>>>,
    cache: &'a PackageCache,
    blob_fetcher: &'a BlobFetcher,
    package_url: String,
    update_policy: UpdatePolicy,
    directory_request: ServerEnd<DirectoryMarker>,
) -> Result<(), Status>
where
    A: AmberConnect,
{
    match PkgUrl::parse(&package_url) {
        Err(err) => handle_bad_package_url(err, &package_url),
        Ok(parsed_package_url) => {
            if !font_package_manager.is_font_package(&parsed_package_url) {
                fx_log_err!("tried to resolve unknown font package: {}", package_url);
                Err(Status::NOT_FOUND)
            } else {
                resolve(
                    &rewrites,
                    &repo_manager,
                    &cache,
                    &blob_fetcher,
                    package_url,
                    vec![],
                    update_policy,
                    directory_request,
                )
                .await
            }
        }
    }
}
/// Resolve a single font package.
Resolve a single font package.
Resolve a single font package .
async fn resolve_font<'a, A>(
    font_package_manager: &'a Arc<FontPackageManager>,
    rewrites: &'a Arc<RwLock<RewriteManager>>,
    repo_manager: &'a Arc<RwLock<RepositoryManager<A>>>,
    cache: &'a PackageCache,
    blob_fetcher: &'a BlobFetcher,
    package_url: String,
    update_policy: UpdatePolicy,
    directory_request: ServerEnd<DirectoryMarker>,
) -> Result<(), Status>
where
    A: AmberConnect,
{
    match PkgUrl::parse(&package_url) {
        Err(err) => handle_bad_package_url(err, &package_url),
        Ok(parsed_package_url) => {
            if !font_package_manager.is_font_package(&parsed_package_url) {
                fx_log_err!("tried to resolve unknown font package: {}", package_url);
                Err(Status::NOT_FOUND)
            } else {
                resolve(
                    &rewrites,
                    &repo_manager,
                    &cache,
                    &blob_fetcher,
                    package_url,
                    vec![],
                    update_policy,
                    directory_request,
                )
                .await
            }
        }
    }
}
async fn resolve_font < ' a , A > ( font_package_manager : & ' a Arc < FontPackageManager > , rewrites : & ' a Arc < RwLock < RewriteManager > > , repo_manager : & ' a Arc < RwLock < RepositoryManager < A > > > , cache : & ' a PackageCache , blob_fetcher : & ' a BlobFetcher , package_url : String , update_policy : UpdatePolicy , directory_request : ServerEnd < DirectoryMarker > , ) -> Result < ( ) , Status > where A : AmberConnect , { match PkgUrl :: parse ( & package_url ) { Err ( err ) => handle_bad_package_url ( err , & package_url ) , Ok ( parsed_package_url ) => { if ! font_package_manager . is_font_package ( & parsed_package_url ) { fx_log_err ! ( " " package_url ) ; Err ( Status :: NOT_FOUND ) } else { resolve ( & rewrites , & repo_manager , & cache , & blob_fetcher , package_url , vec ! [ ] , update_policy , directory_request , ) . await } } } }
Resolve a single font package.
Resolve a single font package .
font_package_manager
&'a Arc<FontPackageManager>
rewrites
&'a Arc<RwLock<RewriteManager>>
repo_manager
&'a Arc<RwLock<RepositoryManager<A>>>
cache
&'a PackageCache
blob_fetcher
&'a BlobFetcher
package_url
String
update_policy
UpdatePolicy
directory_request
ServerEnd<DirectoryMarker>