[−][src]Struct multipart::server::hyper::Switch
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]
H: Handler,
M: MultipartHandler,
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]
H: Handler,
M: MultipartHandler,
fn handle<'a, 'k>(&'a self, req: Request<'a, 'k>, res: Response<'a, Fresh>)
[src]
fn check_continue(&self, (&Method, &RequestUri, &Headers)) -> StatusCode
[src]
fn on_connection_start(&self)
[src]
fn on_connection_end(&self)
[src]
Auto Trait Implementations
impl<H, M> RefUnwindSafe for Switch<H, M> where
H: RefUnwindSafe,
M: RefUnwindSafe,
H: RefUnwindSafe,
M: RefUnwindSafe,
impl<H, M> Send for Switch<H, M> where
H: Send,
M: Send,
H: Send,
M: Send,
impl<H, M> Sync for Switch<H, M> where
H: Sync,
M: Sync,
H: Sync,
M: Sync,
impl<H, M> Unpin for Switch<H, M> where
H: Unpin,
M: Unpin,
H: Unpin,
M: Unpin,
impl<H, M> UnwindSafe for Switch<H, M> where
H: UnwindSafe,
M: UnwindSafe,
H: UnwindSafe,
M: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<F> Handler for F where
F: Fn(Request, Response<Fresh>) + Sync + Send,
[src]
F: Fn(Request, Response<Fresh>) + Sync + Send,
fn handle(&'a self, req: Request<'a, 'k>, res: Response<'a, Fresh>)
[src]
fn check_continue(&self, (&Method, &RequestUri, &Headers)) -> StatusCode
[src]
fn on_connection_start(&self)
[src]
fn on_connection_end(&self)
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,
impl<T> UnsafeAny for T where
T: Any,
T: Any,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,