Skip to main content

page_view

Function page_view 

Source
pub fn page_view(
    spec: &Spec<'_>,
    root: &Command<'_>,
    argv: &[&OsStr],
    cmd: &Command<'_>,
    view: &ViewMeta<'_>,
    page: Page,
    style: Style,
) -> Option<String>
Expand description

The page a help request becomes when a declared executable view is what the user invoked.

argv includes argv0 here, as route_to_view requires: the view’s own name is what selected it. The fallback is the canonical page, which is better than nothing where the route cannot be rebuilt.