Skip to main content

render

Function render 

Source
pub fn render(
    spec: &Spec<'_>,
    argv: &[&OsStr],
    error: &Error<'_, '_>,
    style: Style,
) -> String
Expand description

Render error the way a user should read it.

argv is what was being parsed, which is how the message finds the command to show a usage line for. Error::Help and Error::Version render as nothing: neither is a failure, and a caller that has not handled it before reaching here has a bug this cannot paper over.