[][src]Struct qiniu_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().

Implementations

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

pub fn new(normal: H, multipart: M) -> Switch<H, M>[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]

Auto Trait Implementations

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

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

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

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

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any

impl<T> UnsafeAny for T where
    T: Any

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,