Skip to main content

seed_font_cache

Function seed_font_cache 

Source
pub async fn seed_font_cache(project: &Project) -> Result<Vec<FetchOutcome>>
Expand description

Seeds the font cache with every font a build of project would demand.

water fetch and the tail of water create share this one path: declarations resolve exactly as a build resolves them โ€” [manifest_font_declarations] plus [scan_crate_font_declarations] over the manifest of each crate a build compiles, then [resolve_declarations] โ€” and whatever the cache does not already hold is downloaded into the entry the build then looks for. Builds keep their no-network guarantee; this is the explicit, opt-in network step.

ยงErrors

Returns an error when a backend crate cannot be scaffolded, a manifest cannot be scanned, or a download fails โ€” the error names the backend, or the font and its URL. Declarations fetching can never satisfy arrive as FetchOutcome::Unsatisfiable instead, carrying the same report the build gives them.