Skip to main content

serve

Function serve 

Source
pub async fn serve<C, F, Fut>(
    stream: DebugRequestStream,
    handler: F,
) -> Result<(), Error>
where C: SubCommands, F: FnMut(C) -> Fut, Fut: Future<Output = Result<String, Error>>,
Expand description

Serves a DebugRequestStream by parsing commands into C and invoking handler for each command.