Struct multipart::server::hyper::Switch [−][src]
pub struct Switch<H, M> { /* fields omitted */ }
Expand description
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]
impl<H, M> Switch<H, M> where
H: Handler,
M: MultipartHandler,
[src]Trait Implementations
impl<H, M> Handler for Switch<H, M> where
H: Handler,
M: MultipartHandler,
[src]
impl<H, M> Handler for Switch<H, M> where
H: Handler,
M: MultipartHandler,
[src]fn handle<'a, 'k>(&'a self, req: Request<'a, 'k>, res: Response<'a, Fresh>)
[src]
fn handle<'a, 'k>(&'a self, req: Request<'a, 'k>, res: Response<'a, Fresh>)
[src]Receives a Request
/Response
pair, and should perform some action on them. Read more
fn check_continue(&self, (&Method, &RequestUri, &Headers)) -> StatusCode
[src]
fn check_continue(&self, (&Method, &RequestUri, &Headers)) -> StatusCode
[src]Called when a Request includes a Expect: 100-continue
header. Read more
fn on_connection_start(&self)
[src]
fn on_connection_start(&self)
[src]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
fn on_connection_end(&self)
[src]
fn on_connection_end(&self)
[src]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> 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> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> UnsafeAny for T where
T: Any,
T: Any,