pub struct CommonResponse {
pub status: i32,
pub header_mutation: Option<HeaderMutation>,
pub body_mutation: Option<BodyMutation>,
pub trailers: Option<HeaderMap>,
pub clear_route_cache: bool,
}
Expand description
This message contains common fields between header and body responses. [#next-free-field: 6]
Fields§
§status: i32
If set, provide additional direction on how the Envoy proxy should handle the rest of the HTTP filter chain.
header_mutation: Option<HeaderMutation>
Instructions on how to manipulate the headers. When responding to an HttpBody request, header mutations will only take effect if the current processing mode for the body is BUFFERED.
body_mutation: Option<BodyMutation>
Replace the body of the last message sent to the remote server on this
stream. If responding to an HttpBody request, simply replace or clear
the body chunk that was sent with that request. Body mutations may take
effect in response either to header
or body
messages. When it is
in response to header
messages, it only take effect if the
:ref:status <envoy_v3_api_field_service.ext_proc.v3.CommonResponse.status>
is set to CONTINUE_AND_REPLACE.
trailers: Option<HeaderMap>
[#not-implemented-hide:]
Add new trailers to the message. This may be used when responding to either a
HttpHeaders or HttpBody message, but only if this message is returned
along with the CONTINUE_AND_REPLACE status.
The trailers
encoding is based on the runtime guard
envoy_reloadable_features_send_header_raw_value setting.
When it is true, the header value is encoded in the
:ref:raw_value <envoy_v3_api_field_config.core.v3.HeaderValue.raw_value>
field.
When it is false, the header value is encoded in the
:ref:value <envoy_v3_api_field_config.core.v3.HeaderValue.value>
field.
clear_route_cache: bool
Clear the route cache for the current client request. This is necessary if the remote server modified headers that are used to calculate the route. This field is ignored in the response direction. This field is also ignored if the Envoy ext_proc filter is in the upstream filter chain.
Implementations§
Source§impl CommonResponse
impl CommonResponse
Sourcepub fn status(&self) -> ResponseStatus
pub fn status(&self) -> ResponseStatus
Returns the enum value of status
, or the default if the field is set to an invalid enum value.
Sourcepub fn set_status(&mut self, value: ResponseStatus)
pub fn set_status(&mut self, value: ResponseStatus)
Sets status
to the provided enum value.
Trait Implementations§
Source§impl Clone for CommonResponse
impl Clone for CommonResponse
Source§fn clone(&self) -> CommonResponse
fn clone(&self) -> CommonResponse
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for CommonResponse
impl Debug for CommonResponse
Source§impl Default for CommonResponse
impl Default for CommonResponse
Source§impl Message for CommonResponse
impl Message for CommonResponse
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.Source§impl Name for CommonResponse
impl Name for CommonResponse
Source§const NAME: &'static str = "CommonResponse"
const NAME: &'static str = "CommonResponse"
Message
.
This name is the same as it appears in the source .proto file, e.g. FooBar
.Source§const PACKAGE: &'static str = "envoy.service.ext_proc.v3"
const PACKAGE: &'static str = "envoy.service.ext_proc.v3"
.
, e.g. google.protobuf
.Source§fn full_name() -> String
fn full_name() -> String
Message
.
It’s prefixed with the package name and names of any parent messages,
e.g. google.rpc.BadRequest.FieldViolation
.
By default, this is the package name followed by the message name.
Fully-qualified names must be unique within a domain of Type URLs.Source§impl PartialEq for CommonResponse
impl PartialEq for CommonResponse
impl StructuralPartialEq for CommonResponse
Auto Trait Implementations§
impl Freeze for CommonResponse
impl RefUnwindSafe for CommonResponse
impl Send for CommonResponse
impl Sync for CommonResponse
impl Unpin for CommonResponse
impl UnwindSafe for CommonResponse
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