pub fn parse_command_ref_with_agent_surface_from<T, I, R, F>(
spec: &ToolSpec,
ctx: &AgentModeContext,
argv: I,
run: F,
) -> Result<AgentDispatch<R>, Error>where
T: CommandFactory + FromArgMatches,
I: IntoIterator,
I::Item: Into<OsString> + Clone,
F: FnOnce(&T) -> R,Expand description
Parse argv and hand the typed CLI to a borrowed callback when parsing succeeds.
ยงErrors
Returns a clap error when parsing fails.