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

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]

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

Auto Trait Implementations

impl<H, M> Send for Switch<H, M> where
    H: Send,
    M: Send

impl<H, M> Sync for Switch<H, M> where
    H: Sync,
    M: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Typeable for T where
    T: Any

Get the TypeId of this object.

impl<F> Handler for F where
    F: Fn(Request, Response<Fresh>) + Sync + Send
[src]

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

impl<T> UnsafeAny for T where
    T: Any