Skip to main content

router

Function router 

Source
pub fn router<S>(
    manifests: &[&'static Manifest],
) -> Result<Router<S>, AssetError>
where S: Clone + Send + Sync + 'static,
Expand description

Build a root-mounted Axum router for all manifests in one call.

The /assets, /assets/, and /assets/{*rest} routes force unknown asset URLs to return 404 even when the app has a fallback or root wildcard route. Calling this more than once, or adding another /assets wildcard, conflicts at startup.