Skip to main content

serve

Function serve 

Source
pub async fn serve(input: impl BufRead, output: impl Write) -> Result<()>
Expand description

Serve one connection until the engine closes its input.

§Errors

Returns the underlying std::io::Error when this process can no longer read its input or write its output. Everything else — an unusable configuration, a request this version has no method for, a line that is not JSON — is answered on the wire or reported on standard error, because a plugin that exits on a bad line takes every other in-flight request with it (§6.3).