Skip to main content

register

Function register 

Source
pub fn register(prefix: impl Into<String>, fetcher: EmbeddedAssetFetcher)
Expand description

Register an embedded-asset fetcher for the given URL prefix (e.g. "/assets"). Call this from app bootstrap before serve() runs. Re-registering the same prefix replaces the previous fetcher — last writer wins.