Skip to main content

run_with_provider

Function run_with_provider 

Source
pub fn run_with_provider<I, T>(
    args: I,
    provider: &dyn DescriptorProvider,
) -> ExitCode
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,
Expand description

Run the CLI with an explicit argument iterable and a DescriptorProvider. Accepts any IntoIterator<Item = T> where T: Into<OsString> + Clone, matching the bound of clap::Parser::try_parse_from. Adopter-linked binaries pass their own provider so descriptor-dependent commands (compose, verify, schema, docs) see the adopter’s models instead of an empty inventory.