Skip to main content

bundle_routes

Function bundle_routes 

Source
pub fn bundle_routes<S>(
    client: Arc<ClientAssets>,
    headers: &PageHeaders,
) -> Result<Router<S>, AxError>
where S: Clone + Send + Sync + 'static,
Expand description

The two routes that answer the client bundle: / and every path below it that no other route of the same table claims.

The city’s own port and the remote listener (bin::outside) serve the page through this one table, so a device that opens the remote address gets the same bytes as a browser on this machine (crates/wire/Spec.lean §8-2); headers are the listener’s own, generated once per listener (crates/wire/spec/Reception/Entry.lean §8-94). The routes take no credential: a browser has to load the page before it has anywhere to pair.

§Errors

headers cannot be spelled as HTTP headers.