pub struct HyperBackend<F> { /* private fields */ }
Available on (crate features
http1
or http2
or http3
) and (crate features http1
or http2
) only.Expand description
A backend that handles incoming HTTP connections using a hyper backend.
This is used internally by the HttpServer
but can be used directly if preferred.
Call run
to start the server.
Implementations§
Source§impl<F> HyperBackend<F>
impl<F> HyperBackend<F>
Sourcepub fn builder() -> HyperBackendBuilder<F>
pub fn builder() -> HyperBackendBuilder<F>
Create an instance of HyperBackend
using the builder syntax
Source§impl<F> HyperBackend<F>where
F: HttpServiceFactory + Clone + Send + 'static,
F::Error: Error + Send,
F::Service: Clone + Send + 'static,
<F::Service as HttpService>::Error: Error + Send + Sync,
<F::Service as HttpService>::ResBody: Send,
<<F::Service as HttpService>::ResBody as Body>::Data: Send,
<<F::Service as HttpService>::ResBody as Body>::Error: Error + Send + Sync,
impl<F> HyperBackend<F>where
F: HttpServiceFactory + Clone + Send + 'static,
F::Error: Error + Send,
F::Service: Clone + Send + 'static,
<F::Service as HttpService>::Error: Error + Send + Sync,
<F::Service as HttpService>::ResBody: Send,
<<F::Service as HttpService>::ResBody as Body>::Data: Send,
<<F::Service as HttpService>::ResBody as Body>::Error: Error + Send + Sync,
Trait Implementations§
Source§impl<F: Clone> Clone for HyperBackend<F>
impl<F: Clone> Clone for HyperBackend<F>
Source§fn clone(&self) -> HyperBackend<F>
fn clone(&self) -> HyperBackend<F>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl<F> Freeze for HyperBackend<F>where
F: Freeze,
impl<F> !RefUnwindSafe for HyperBackend<F>
impl<F> Send for HyperBackend<F>where
F: Send,
impl<F> Sync for HyperBackend<F>where
F: Sync,
impl<F> Unpin for HyperBackend<F>where
F: Unpin,
impl<F> !UnwindSafe for HyperBackend<F>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more