pub struct H2Detect<T> { /* private fields */ }Expand description
Service for detecting HTTP version and routing connections accordingly.
H2Detect examines the initial bytes of an incoming connection to
determine whether it’s an HTTP/2 connection (by checking for the HTTP/2 preface)
or an HTTP/1.x connection. It then forwards the connection to the inner service
with appropriate version information.
For implementation details and example usage, see the
module level documentation.
Implementations§
Trait Implementations§
Source§impl<F: AsyncMakeService> AsyncMakeService for H2Detect<F>
impl<F: AsyncMakeService> AsyncMakeService for H2Detect<F>
Source§type Service = DetectService<PrefixDetector, <F as AsyncMakeService>::Service>
type Service = DetectService<PrefixDetector, <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<F: MakeService> MakeService for H2Detect<F>
impl<F: MakeService> MakeService for H2Detect<F>
Source§type Service = DetectService<PrefixDetector, <F as MakeService>::Service>
type Service = DetectService<PrefixDetector, <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.
Auto Trait Implementations§
impl<T> Freeze for H2Detect<T>where
T: Freeze,
impl<T> RefUnwindSafe for H2Detect<T>where
T: RefUnwindSafe,
impl<T> Send for H2Detect<T>where
T: Send,
impl<T> Sync for H2Detect<T>where
T: Sync,
impl<T> Unpin for H2Detect<T>where
T: Unpin,
impl<T> UnwindSafe for H2Detect<T>where
T: 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