Struct multipart::server::hyper::Switch [] [src]

pub struct Switch<H, M> { /* fields omitted */ }

A container that implements hyper::server::Handler which will switch the handler implementation depending on if the incoming request is multipart or not.

Create an instance with new() and pass it to hyper::server::Server::listen() where you would normally pass a Handler instance.

A convenient wrapper for Multipart::from_request().

Methods

impl<H, M> Switch<H, M> where H: Handler, M: MultipartHandler
[src]

Create a new Switch instance where normal handles normal Hyper requests and multipart handles Multipart requests

Trait Implementations

impl<H, M> Handler for Switch<H, M> where H: Handler, M: MultipartHandler
[src]

Receives a Request/Response pair, and should perform some action on them. Read more

Called when a Request includes a Expect: 100-continue header. Read more

This is run after a connection is received, on a per-connection basis (not a per-request basis, as a connection with keep-alive may handle multiple requests) Read more

This is run before a connection is closed, on a per-connection basis (not a per-request basis, as a connection with keep-alive may handle multiple requests) Read more