Struct hrpc::Request [−][src]
pub struct Request<T> { /* fields omitted */ }
Expand description
A hRPC request.
Implementations
Get an immutable reference to the header map.
Get a mutable reference to the header map.
Get a mutable reference to the header map, inserting a new one if it doesn’t already exist.
Get an immutable reference to the HTTP extensions.
Get a mutable reference to the HTTP extensions.
Get a mutable reference to the HTTP extensions, inserting a new one if it doesn’t already exist.
Creates a new request using the provided body.
Get a mutable reference to the extensions of this response.
Get an immutable reference to the extensions of this response.
Get a mutable reference to the endpoint of this response.
Extract the body from the request and decode it into the message.
Trait Implementations
Convert this to a hRPC request.
type Response = BoxResponse
type Response = BoxResponse
Responses given by the service.
type Error = TransportError<BoxedTransportError>
type Error = TransportError<BoxedTransportError>
Errors produced by the service.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
type Response = BoxResponse
type Response = BoxResponse
Responses given by the service.
type Error = TransportError<HyperError>
type Error = TransportError<HyperError>
Errors produced by the service.
type Future = HyperCallFuture
type Future = HyperCallFuture
The future response value.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
type Response = BoxResponse
type Response = BoxResponse
Responses given by the service.
type Error = TransportError<WasmError>
type Error = TransportError<WasmError>
Errors produced by the service.
type Future = CallFuture
type Future = CallFuture
The future response value.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
type Response = BoxResponse
type Response = BoxResponse
Responses given by the service.
type Error = TransportError<MockError>
type Error = TransportError<MockError>
Errors produced by the service.
type Future = MockCallFuture
type Future = MockCallFuture
The future response value.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
impl<S, ExtractKey, BypassForKey, Key> Service<Request<()>> for RateLimit<S, ExtractKey, BypassForKey, Key> where
S: Service<BoxRequest, Response = BoxResponse, Error = Infallible>,
ExtractKey: Fn(&mut BoxRequest) -> Option<Key>,
BypassForKey: Fn(&Key) -> bool,
Key: Eq + Hash,
impl<S, ExtractKey, BypassForKey, Key> Service<Request<()>> for RateLimit<S, ExtractKey, BypassForKey, Key> where
S: Service<BoxRequest, Response = BoxResponse, Error = Infallible>,
ExtractKey: Fn(&mut BoxRequest) -> Option<Key>,
BypassForKey: Fn(&Key) -> bool,
Key: Eq + Hash,
type Future = RateLimitFuture<S::Future>
type Future = RateLimitFuture<S::Future>
The future response value.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
type Response = BoxResponse
type Response = BoxResponse
Responses given by the service.
type Error = Infallible
type Error = Infallible
Errors produced by the service.
type Future = BoxFuture<'static, Result<BoxResponse, Infallible>>
type Future = BoxFuture<'static, Result<BoxResponse, Infallible>>
The future response value.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
type Response = BoxResponse
type Response = BoxResponse
Responses given by the service.
type Error = Infallible
type Error = Infallible
Errors produced by the service.
type Future = BoxFuture<'static, Result<BoxResponse, Infallible>>
type Future = BoxFuture<'static, Result<BoxResponse, Infallible>>
The future response value.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
impl<ToStatus, S> Service<Request<()>> for ErrorIdentifierToStatus<ToStatus, S> where
S: Service<BoxRequest, Response = BoxResponse>,
ToStatus: Fn(&str) -> Option<StatusCode> + Clone,
impl<ToStatus, S> Service<Request<()>> for ErrorIdentifierToStatus<ToStatus, S> where
S: Service<BoxRequest, Response = BoxResponse>,
ToStatus: Fn(&str) -> Option<StatusCode> + Clone,
type Response = BoxResponse
type Response = BoxResponse
Responses given by the service.
type Future = ErrorIdentifierToStatusFuture<ToStatus, S::Future>
type Future = ErrorIdentifierToStatusFuture<ToStatus, S::Future>
The future response value.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
impl<ModifyReq, ModifyResp, S> Service<Request<()>> for Modify<ModifyReq, ModifyResp, S> where
S: Service<BoxRequest, Response = BoxResponse>,
ModifyReq: Fn(&mut BoxRequest),
ModifyResp: Fn(&mut BoxResponse) + Clone,
impl<ModifyReq, ModifyResp, S> Service<Request<()>> for Modify<ModifyReq, ModifyResp, S> where
S: Service<BoxRequest, Response = BoxResponse>,
ModifyReq: Fn(&mut BoxRequest),
ModifyResp: Fn(&mut BoxResponse) + Clone,
type Response = BoxResponse
type Response = BoxResponse
Responses given by the service.
type Future = ModifyFuture<ModifyResp, S::Future>
type Future = ModifyFuture<ModifyResp, S::Future>
The future response value.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
impl<S, SpanFn, OnRequestFn, OnSuccessFn, OnErrorFn> Service<Request<()>> for Trace<S, SpanFn, OnRequestFn, OnSuccessFn, OnErrorFn> where
S: Service<BoxRequest, Response = BoxResponse>,
SpanFn: Fn(&BoxRequest) -> Span,
OnRequestFn: Fn(&BoxRequest, &Span),
OnSuccessFn: Fn(&BoxResponse, &Span) + Clone,
OnErrorFn: Fn(&BoxResponse, &Span, &HrpcError) + Clone,
impl<S, SpanFn, OnRequestFn, OnSuccessFn, OnErrorFn> Service<Request<()>> for Trace<S, SpanFn, OnRequestFn, OnSuccessFn, OnErrorFn> where
S: Service<BoxRequest, Response = BoxResponse>,
SpanFn: Fn(&BoxRequest) -> Span,
OnRequestFn: Fn(&BoxRequest, &Span),
OnSuccessFn: Fn(&BoxResponse, &Span) + Clone,
OnErrorFn: Fn(&BoxResponse, &Span, &HrpcError) + Clone,
type Future = TraceFuture<S::Future, OnSuccessFn, OnErrorFn>
type Future = TraceFuture<S::Future, OnSuccessFn, OnErrorFn>
The future response value.
Returns Poll::Ready(Ok(()))
when the service is able to process requests. Read more
Process the request and return the response asynchronously. Read more
Auto Trait Implementations
impl<T> !RefUnwindSafe for Request<T>
impl<T> !UnwindSafe for Request<T>
Blanket Implementations
Mutably borrows from an owned value. Read more
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
pub fn vzip(self) -> V
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more