Module swagger::composites [] [src]

Module for combining hyper services

Use by passing hyper::server::NewService instances to a CompositeNewService together with the base path for requests that should be handled by that service.

Structs

CompositeNewService

Wraps a vector of pairs, each consisting of a base path as a &'static str and a NewService instance. Implements Deref<Vec> and DerefMut<Vec> so these can be manipulated using standard Vec methods.

CompositeService

Wraps a vector of pairs, each consisting of a base path as a &'static str and a Service instance.

Traits

BoxedNewService

Trait for wrapping hyper NewServices to make the return type of new_service uniform. This is necessary in order for the NewServices with different Instance types to be stored in a single collection.

GetPath

Trait for getting the path of a request. Must be implemented on the Request associated type for NewServices being combined in a CompositeNewService.

NotFound

Trait for generating a default "not found" response. Must be implemented on the Response associated type for NewServices being combined in a CompositeNewService.