Skip to main content

install_routing

Function install_routing 

Source
pub fn install_routing(
    app: &mut App,
    entry: String,
    keys: Vec<String>,
    at: Location,
)
Expand description

Install navigation for a known page set: the registry, the in-memory history, the reserved-signal seeds, and the two navigation systems.

This is what both an app loaded from source and one loaded from a compiled artifact end up calling; they differ only in where the page set came from, a directory listing in one case and lumen_ir::artifact::CompiledPages in the other.

entry and keys are the site: its home page and every page it holds, which is what a later navigation resolves against. at is where this app opens, which is a question about the address it was asked for: a window opens on the entry with nothing left over, and a document served for /user/42 opens on user with /42 in hand.