pub fn serve<Ent: Entity, B: Body + From<Box<dyn Stream<Item = Result<Ent::Data, Ent::Error>> + Send>>, BI>(
    entity: Ent,
    req: &Request<BI>
) -> Response<B>
Expand description

Serves GET and HEAD requests for a given byte-ranged entity. Handles conditional & subrange requests. The caller is expected to have already determined the correct entity and appended Expires, Cache-Control, and Vary headers if desired.