pub struct HttpCoreService<H> { /* private fields */ }Expand description
Core HTTP service handler supporting both HTTP/1.1 and HTTP/2 protocols.
HttpCoreService is responsible for accepting HTTP connections, decoding requests,
routing them through a handler chain, and encoding responses. It supports both
HTTP/1.1 with keep-alive and HTTP/2 with multiplexing.
For implementation details and example usage, see the
module level documentation.
Implementations§
Source§impl<H> HttpCoreService<H>
impl<H> HttpCoreService<H>
pub fn new(handler_chain: H, http_timeout: HttpServerTimeout) -> Self
Source§impl<F> HttpCoreService<F>
impl<F> HttpCoreService<F>
pub fn layer<C>() -> impl FactoryLayer<C, F, Factory = Self>where
C: Param<HttpServerTimeout>,
Trait Implementations§
Source§impl<F: AsyncMakeService> AsyncMakeService for HttpCoreService<F>
impl<F: AsyncMakeService> AsyncMakeService for HttpCoreService<F>
Source§type Service = HttpCoreService<<F as AsyncMakeService>::Service>
type Service = HttpCoreService<<F as AsyncMakeService>::Service>
The type of service this factory creates.
Source§type Error = <F as AsyncMakeService>::Error
type Error = <F as AsyncMakeService>::Error
The type of error that can occur during service creation.
Source§impl<H: Clone> Clone for HttpCoreService<H>
impl<H: Clone> Clone for HttpCoreService<H>
Source§fn clone(&self) -> HttpCoreService<H>
fn clone(&self) -> HttpCoreService<H>
Returns a duplicate 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 moreSource§impl<F: MakeService> MakeService for HttpCoreService<F>
impl<F: MakeService> MakeService for HttpCoreService<F>
Source§type Service = HttpCoreService<<F as MakeService>::Service>
type Service = HttpCoreService<<F as MakeService>::Service>
The type of service this factory creates.
Source§type Error = <F as MakeService>::Error
type Error = <F as MakeService>::Error
The type of error that can occur during service creation.
Source§impl<H, Stream, CXIn, CXStore, CXState, Err> Service<(bool, Stream, CXIn)> for HttpCoreService<H>where
CXIn: ParamRef<PeerAddr> + Fork<Store = CXStore, State = CXState>,
CXStore: 'static,
for<'a> CXState: Attach<CXStore>,
for<'a> H: HttpHandler<<CXState as Attach<CXStore>>::Hdr<'a>, HttpBody, Body = HttpBody, Error = Err>,
Stream: Split + AsyncReadRent + AsyncWriteRent + Unpin + 'static,
Err: Into<AnyError> + Debug,
impl<H, Stream, CXIn, CXStore, CXState, Err> Service<(bool, Stream, CXIn)> for HttpCoreService<H>where
CXIn: ParamRef<PeerAddr> + Fork<Store = CXStore, State = CXState>,
CXStore: 'static,
for<'a> CXState: Attach<CXStore>,
for<'a> H: HttpHandler<<CXState as Attach<CXStore>>::Hdr<'a>, HttpBody, Body = HttpBody, Error = Err>,
Stream: Split + AsyncReadRent + AsyncWriteRent + Unpin + 'static,
Err: Into<AnyError> + Debug,
Source§type Error = Infallible
type Error = Infallible
The type of error that this service can produce.
Auto Trait Implementations§
impl<H> Freeze for HttpCoreService<H>where
H: Freeze,
impl<H> RefUnwindSafe for HttpCoreService<H>where
H: RefUnwindSafe,
impl<H> Send for HttpCoreService<H>where
H: Send,
impl<H> Sync for HttpCoreService<H>where
H: Sync,
impl<H> Unpin for HttpCoreService<H>where
H: Unpin,
impl<H> UnwindSafe for HttpCoreService<H>where
H: UnwindSafe,
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