Skip to main content

serve

Function serve 

Source
pub async fn serve<F>(addr: &str, handler: F) -> Result<()>
where F: FnMut(HttpRequest) -> HttpResponse + Send + 'static,
Expand description

Bind addr and serve forever — THE AOT entry, and the engine-selection seam: LOGOS_HTTP_ENGINE=uring|tokio picks the engine, defaulting to the Linux thread-per-core io_uring engine wherever a probe ring initializes (else tokio), always announced with one stderr line. Handler calls are serialized either way (the FnMut contract); serve_with_statics is the shared-handler entry that also carries the static-response fast path.