pub struct ProtoHttp1ClientLayer<Svc>where
Svc: Service<(ReadHalf<SimplexStream>, WriteHalf<SimplexStream>), Response = ()> + Send + Clone,{ /* 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§
Source§impl<Svc> ProtoHttp1ClientLayer<Svc>where
Svc: Service<(ReadHalf<SimplexStream>, WriteHalf<SimplexStream>), Response = ()> + Send + Clone,
impl<Svc> ProtoHttp1ClientLayer<Svc>where
Svc: Service<(ReadHalf<SimplexStream>, WriteHalf<SimplexStream>), Response = ()> + Send + Clone,
Sourcepub fn new(config: ProtoHttp1ClientConfig, inner: Svc) -> Self
pub fn new(config: ProtoHttp1ClientConfig, inner: Svc) -> Self
Create a new instance of the service
Trait Implementations§
Source§impl<Svc, SvcError, SvcFut> Service<HTTP1Request> for ProtoHttp1ClientLayer<Svc>
impl<Svc, SvcError, SvcFut> Service<HTTP1Request> for ProtoHttp1ClientLayer<Svc>
Source§type Response = HTTP1ClientResponse<ReadHalf<SimplexStream>, WriteHalf<SimplexStream>>
type Response = HTTP1ClientResponse<ReadHalf<SimplexStream>, WriteHalf<SimplexStream>>
The response is handled by the protocol
Source§type Error = ProtoHttp1LayerError<SvcError>
type Error = ProtoHttp1LayerError<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<<ProtoHttp1ClientLayer<Svc> as Service<HTTP1Request>>::Response, <ProtoHttp1ClientLayer<Svc> as Service<HTTP1Request>>::Error>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<<ProtoHttp1ClientLayer<Svc> as Service<HTTP1Request>>::Response, <ProtoHttp1ClientLayer<Svc> as Service<HTTP1Request>>::Error>> + Send>>
The future is the protocol itself
Source§fn call(&mut self, request: HTTP1Request) -> Self::Future
fn call(&mut self, request: HTTP1Request) -> Self::Future
Indefinitely process the protocol
Auto Trait Implementations§
impl<Svc> Freeze for ProtoHttp1ClientLayer<Svc>where
Svc: Freeze,
impl<Svc> RefUnwindSafe for ProtoHttp1ClientLayer<Svc>where
Svc: RefUnwindSafe,
impl<Svc> Send for ProtoHttp1ClientLayer<Svc>
impl<Svc> Sync for ProtoHttp1ClientLayer<Svc>where
Svc: Sync,
impl<Svc> Unpin for ProtoHttp1ClientLayer<Svc>where
Svc: Unpin,
impl<Svc> UnwindSafe for ProtoHttp1ClientLayer<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