Function handle

Source
pub fn handle<F>(func: F)
where F: FnOnce(Request) -> Response,
Expand description

Call a function as a CGI programme.

This should be called from a main function. Parse & extract the CGI environmental variables, and HTTP request body, to create Request, and convert your Response into the correct format and print to stdout.