[][src]Module hyperdrive::service

Implements hyper Service adapters that reduce boilerplate.

This module contains adapters for hyper's Service trait that make common operations easier and require less boilerplate:

  • AsyncService and SyncService can be directly passed to a hyper server and will decode incoming requests for you and invoke a handler closure. They make it very easy to use any type implementing FromRequest as the main entry point of your app.
  • ServiceExt provides adapter methods on Hyper Services that simplify common patterns like catching panics.

Structs

AsyncService

Asynchronous hyper service adapter.

CatchUnwind

A Service adapter that catches unwinding panics.

MakeServiceByCloning

Implements Hyper's MakeService trait by cloning a service S for every incoming connection.

SyncService

A hyper Service that dispatches requests to a blocking handler.

Traits

ServiceExt

Extension trait for types implementing Hyper's Service trait.