pub async fn run_font_resolver_service<A>(
    font_package_manager: Arc<FontPackageManager>,
    rewrites: Arc<RwLock<RewriteManager>>,
    repo_manager: Arc<RwLock<RepositoryManager<A>>>,
    cache: PackageCache,
    blob_fetcher: BlobFetcher,
    mut stream: FontResolverRequestStream,
) -> Result<(), Error>
where
    A: AmberConnect,
{
    while let Some(event) = stream.try_next().await? {
        let FontResolverRequest::Resolve {
            package_url,
            update_policy,
            directory_request,
            responder,
        } = event;

        let result = resolve_font(
            &font_package_manager,
            &rewrites,
            &repo_manager,
            &cache,
            &blob_fetcher,
            package_url,
            update_policy,
            directory_request,
        )
        .await;

        responder.send(Status::from(result).into_raw())?;
    }
    Ok(())
}
/// Run a service that only resolves registered font packages.
Run a service that only resolves registered font packages.
Run a service that only resolves registered font packages .
pub async fn run_font_resolver_service<A>(
    font_package_manager: Arc<FontPackageManager>,
    rewrites: Arc<RwLock<RewriteManager>>,
    repo_manager: Arc<RwLock<RepositoryManager<A>>>,
    cache: PackageCache,
    blob_fetcher: BlobFetcher,
    mut stream: FontResolverRequestStream,
) -> Result<(), Error>
where
    A: AmberConnect,
{
    while let Some(event) = stream.try_next().await? {
        let FontResolverRequest::Resolve {
            package_url,
            update_policy,
            directory_request,
            responder,
        } = event;
        let result = resolve_font(
            &font_package_manager,
            &rewrites,
            &repo_manager,
            &cache,
            &blob_fetcher,
            package_url,
            update_policy,
            directory_request,
        )
        .await;
        responder.send(Status::from(result).into_raw())?;
    }
    Ok(())
}
pub async fn run_font_resolver_service < A > ( font_package_manager : Arc < FontPackageManager > , rewrites : Arc < RwLock < RewriteManager > > , repo_manager : Arc < RwLock < RepositoryManager < A > > > , cache : PackageCache , blob_fetcher : BlobFetcher , mut stream : FontResolverRequestStream , ) -> Result < ( ) , Error > where A : AmberConnect , { while let Some ( event ) = stream . try_next ( ) . await ? { let FontResolverRequest :: Resolve { package_url , update_policy , directory_request , responder , } = event ; let result = resolve_font ( & font_package_manager , & rewrites , & repo_manager , & cache , & blob_fetcher , package_url , update_policy , directory_request , ) . await ; responder . send ( Status :: from ( result ) . into_raw ( ) ) ? ; } Ok ( ( ) ) }
Run a service that only resolves registered font packages.
Run a service that only resolves registered font packages .
font_package_manager
Arc<FontPackageManager>
rewrites
Arc<RwLock<RewriteManager>>
repo_manager
Arc<RwLock<RepositoryManager<A>>>
cache
PackageCache
blob_fetcher
BlobFetcher
stream
FontResolverRequestStream