pub struct ConnectionReuseHandler<H> { /* private fields */ }Expand description
Handler for managing HTTP connection persistence and keep-alive behavior.
ConnectionReuseHandler is responsible for:
- Detecting whether an incoming request supports keep-alive.
- Modifying request and response headers to ensure proper keep-alive behavior.
- Handling version-specific connection persistence logic for HTTP/1.0, HTTP/1.1, and HTTP/2.
For implementation details and example usage, see the module level documentation.
Implementations§
Source§impl<F> ConnectionReuseHandler<F>
impl<F> ConnectionReuseHandler<F>
pub fn layer<C>() -> impl FactoryLayer<C, F, Factory = Self>
Trait Implementations§
Source§impl<F: AsyncMakeService> AsyncMakeService for ConnectionReuseHandler<F>
impl<F: AsyncMakeService> AsyncMakeService for ConnectionReuseHandler<F>
Source§type Service = ConnectionReuseHandler<<F as AsyncMakeService>::Service>
type Service = ConnectionReuseHandler<<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 ConnectionReuseHandler<H>
impl<H: Clone> Clone for ConnectionReuseHandler<H>
Source§fn clone(&self) -> ConnectionReuseHandler<H>
fn clone(&self) -> ConnectionReuseHandler<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 ConnectionReuseHandler<F>
impl<F: MakeService> MakeService for ConnectionReuseHandler<F>
Source§type Service = ConnectionReuseHandler<<F as MakeService>::Service>
type Service = ConnectionReuseHandler<<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, CX, B> Service<(Request<B>, CX)> for ConnectionReuseHandler<H>where
H: HttpHandler<CX, B>,
impl<H, CX, B> Service<(Request<B>, CX)> for ConnectionReuseHandler<H>where
H: HttpHandler<CX, B>,
Auto Trait Implementations§
impl<H> Freeze for ConnectionReuseHandler<H>where
H: Freeze,
impl<H> RefUnwindSafe for ConnectionReuseHandler<H>where
H: RefUnwindSafe,
impl<H> Send for ConnectionReuseHandler<H>where
H: Send,
impl<H> Sync for ConnectionReuseHandler<H>where
H: Sync,
impl<H> Unpin for ConnectionReuseHandler<H>where
H: Unpin,
impl<H> UnwindSafe for ConnectionReuseHandler<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