Skip to main content

parse_args_from

Function parse_args_from 

Source
pub fn parse_args_from<'v, T>(
    argv: &[&'v OsStr],
) -> Result<T, Error<'static, 'v>>
where T: CommandArgs,
Expand description

Parse arguments directly into a derived CommandArgs type.

Unlike a root CLI’s parse_from, this needs no enclosing CLI declaration: it starts at the command represented by T and treats argv as that command’s arguments. This is useful for adapters and embedded command surfaces that need one command’s exact parser without parsing and dispatching the complete application again.