pub enum Request {
RequestHeaders(HttpHeaders),
ResponseHeaders(HttpHeaders),
RequestBody(HttpBody),
ResponseBody(HttpBody),
RequestTrailers(HttpTrailers),
ResponseTrailers(HttpTrailers),
}
Expand description
Each request message will include one of the following sub-messages. Which ones are set for a particular HTTP request/response depend on the processing mode.
Variants§
RequestHeaders(HttpHeaders)
Information about the HTTP request headers, as well as peer info and additional
properties. Unless observability_mode
is true
, the server must send back a
HeaderResponse message, an ImmediateResponse message, or close the stream.
ResponseHeaders(HttpHeaders)
Information about the HTTP response headers, as well as peer info and additional
properties. Unless observability_mode
is true
, the server must send back a
HeaderResponse message or close the stream.
RequestBody(HttpBody)
A chunk of the HTTP request body. Unless observability_mode
is true, the server must send back
a BodyResponse message, an ImmediateResponse message, or close the stream.
ResponseBody(HttpBody)
A chunk of the HTTP response body. Unless observability_mode
is true
, the server must send back
a BodyResponse message or close the stream.
RequestTrailers(HttpTrailers)
The HTTP trailers for the request path. Unless observability_mode
is true
, the server
must send back a TrailerResponse message or close the stream.
This message is only sent if the trailers processing mode is set to SEND
and
the original downstream request has trailers.
ResponseTrailers(HttpTrailers)
The HTTP trailers for the response path. Unless observability_mode
is true
, the server
must send back a TrailerResponse message or close the stream.
This message is only sent if the trailers processing mode is set to SEND
and
the original upstream response has trailers.
Implementations§
Source§impl Request
impl Request
Sourcepub fn merge(
field: &mut Option<Request>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<Request>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
Sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
impl StructuralPartialEq for Request
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request