Skip to main content

serve_later

Function serve_later 

Source
pub fn serve_later<R: BufRead>(
    input: R,
    output: Output,
    capabilities: Value,
    handler: impl FnMut(&str, Value, Reply),
) -> Result<()>
Expand description

serve for a plugin whose answers may wait (an HTTP client): handler answers by its Reply, from wherever it wants, and goes back to reading at once, so that a long call does not hold the others.