pub struct ProtoHttp2Layer<Svc>{ /* private fields */ }Expand description
A service to process HTTP/1.1 requests
This should not be constructed directly - it gets created by MakeService during invocation.
Implementations§
Trait Implementations§
Source§impl<Reader, Writer, Svc, SvcError, SvcFut> Service<(Reader, Writer)> for ProtoHttp2Layer<Svc>where
Reader: AsyncReadExt + Send + Unpin + 'static,
Writer: AsyncWriteExt + Send + Unpin + 'static,
Svc: Service<(Receiver<Http2Frame>, Sender<Http2Frame>), Response = (), Error = SvcError, Future = SvcFut> + Send + Clone + 'static,
SvcFut: Future<Output = Result<(Receiver<Http2Frame>, Sender<Http2Frame>), SvcError>> + Send + 'static,
SvcError: Debug + Send + 'static,
impl<Reader, Writer, Svc, SvcError, SvcFut> Service<(Reader, Writer)> for ProtoHttp2Layer<Svc>where
Reader: AsyncReadExt + Send + Unpin + 'static,
Writer: AsyncWriteExt + Send + Unpin + 'static,
Svc: Service<(Receiver<Http2Frame>, Sender<Http2Frame>), Response = (), Error = SvcError, Future = SvcFut> + Send + Clone + 'static,
SvcFut: Future<Output = Result<(Receiver<Http2Frame>, Sender<Http2Frame>), SvcError>> + Send + 'static,
SvcError: Debug + Send + 'static,
Source§type Error = ProtoHttp2Error<SvcError>
type Error = ProtoHttp2Error<SvcError>
Errors would be failures in parsing the protocol - this should be handled by the protocol
Source§type Future = Pin<Box<dyn Future<Output = Result<<ProtoHttp2Layer<Svc> as Service<(Reader, Writer)>>::Response, <ProtoHttp2Layer<Svc> as Service<(Reader, Writer)>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<ProtoHttp2Layer<Svc> as Service<(Reader, Writer)>>::Response, <ProtoHttp2Layer<Svc> as Service<(Reader, Writer)>>::Error>> + Send>>
The future is the protocol itself
Source§fn call(&mut self, (reader, writer): (Reader, Writer)) -> Self::Future
fn call(&mut self, (reader, writer): (Reader, Writer)) -> Self::Future
Indefinitely process the protocol
Auto Trait Implementations§
impl<Svc> Freeze for ProtoHttp2Layer<Svc>where
Svc: Freeze,
impl<Svc> RefUnwindSafe for ProtoHttp2Layer<Svc>where
Svc: RefUnwindSafe,
impl<Svc> Send for ProtoHttp2Layer<Svc>
impl<Svc> Sync for ProtoHttp2Layer<Svc>where
Svc: Sync,
impl<Svc> Unpin for ProtoHttp2Layer<Svc>where
Svc: Unpin,
impl<Svc> UnwindSafe for ProtoHttp2Layer<Svc>where
Svc: 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