pub enum Response {
RequestHeaders(HeadersResponse),
ResponseHeaders(HeadersResponse),
RequestBody(BodyResponse),
ResponseBody(BodyResponse),
RequestTrailers(TrailersResponse),
ResponseTrailers(TrailersResponse),
ImmediateResponse(ImmediateResponse),
}
Variants§
RequestHeaders(HeadersResponse)
The server must send back this message in response to a message with the
request_headers
field set.
ResponseHeaders(HeadersResponse)
The server must send back this message in response to a message with the
response_headers
field set.
RequestBody(BodyResponse)
The server must send back this message in response to a message with
the request_body
field set.
ResponseBody(BodyResponse)
The server must send back this message in response to a message with
the response_body
field set.
RequestTrailers(TrailersResponse)
The server must send back this message in response to a message with
the request_trailers
field set.
ResponseTrailers(TrailersResponse)
The server must send back this message in response to a message with
the response_trailers
field set.
ImmediateResponse(ImmediateResponse)
If specified, attempt to create a locally generated response, send it
downstream, and stop processing additional filters and ignore any
additional messages received from the remote server for this request or
response. If a response has already started – for example, if this
message is sent response to a response_body
message – then
this will either ship the reply directly to the downstream codec,
or reset the stream.
Implementations§
Source§impl Response
impl Response
Sourcepub fn merge(
field: &mut Option<Response>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<Response>, 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 Response
Auto Trait Implementations§
impl Freeze for Response
impl RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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