Skip to main content

next_command

Function next_command 

Source
pub async fn next_command<C: SubCommands>(
    stream: &mut DebugRequestStream,
) -> Result<Option<(C, CommandResponder)>, Error>
Expand description

Reads the next parsed subcommand from a DebugRequestStream.

Automatically responds to ListCommands requests using C’s subcommand metadata, as well as --help and syntax errors on Execute requests. Returns Ok(None) when the stream closes.