Module endpoints

Module endpoints 

Source
Expand description

Pre-defined endpoints.

This module defines a few endpoints that might be useful for a given HTTP application. Their use should be as simple as this:

http.at("/home").get(under::endpoints::simple(|| {
    Response::text("hello, there!")
}));

Structs§

ScopeEndpoint
The scope endpoint.
ScopeEndpointBuilder
A builder for a ScopeEndpoint.

Functions§

dir
Creates an endpoint that serves files from the given directory.
scope
Creates a builder for a ScopeEndpoint.
simple
Creates an endpoint that synchronously, infallibly generates a response.
sync
Creates an endpoint that synchronously generates a response.