#[repr(i32)]pub enum HeaderPosition {
Unspecified = 0,
Request = 1,
Response = 2,
Both = 3,
}Expand description
Where a Header mutation applies. BOTH applies the same edit on the
request side (before backend connect) and the response side (before kawa
preparation). Mirrors HAProxy http-request set-header /
http-response set-header parity.
Variants§
Unspecified = 0
Reserve 0 for the proto-default-encoded shape so a Header written
by ..Default::default() (or by an older client) deserialises into
an explicit “unset” rather than failing HeaderPosition::try_from(0).
The runtime treats this as a hard config error and rejects the
header rather than guessing a position.
Request = 1
Response = 2
Both = 3
Implementations§
Source§impl HeaderPosition
impl HeaderPosition
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for HeaderPosition
impl Clone for HeaderPosition
Source§fn clone(&self) -> HeaderPosition
fn clone(&self) -> HeaderPosition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HeaderPosition
impl Debug for HeaderPosition
Source§impl Default for HeaderPosition
impl Default for HeaderPosition
Source§fn default() -> HeaderPosition
fn default() -> HeaderPosition
Source§impl<'de> Deserialize<'de> for HeaderPosition
impl<'de> Deserialize<'de> for HeaderPosition
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl From<HeaderPosition> for i32
impl From<HeaderPosition> for i32
Source§fn from(value: HeaderPosition) -> i32
fn from(value: HeaderPosition) -> i32
Source§impl Hash for HeaderPosition
impl Hash for HeaderPosition
Source§impl Ord for HeaderPosition
impl Ord for HeaderPosition
Source§fn cmp(&self, other: &HeaderPosition) -> Ordering
fn cmp(&self, other: &HeaderPosition) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for HeaderPosition
impl PartialEq for HeaderPosition
Source§fn eq(&self, other: &HeaderPosition) -> bool
fn eq(&self, other: &HeaderPosition) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for HeaderPosition
impl PartialOrd for HeaderPosition
Source§impl Serialize for HeaderPosition
impl Serialize for HeaderPosition
Source§impl TryFrom<i32> for HeaderPosition
impl TryFrom<i32> for HeaderPosition
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<HeaderPosition, UnknownEnumValue>
fn try_from(value: i32) -> Result<HeaderPosition, UnknownEnumValue>
impl Copy for HeaderPosition
impl Eq for HeaderPosition
impl StructuralPartialEq for HeaderPosition
Auto Trait Implementations§
impl Freeze for HeaderPosition
impl RefUnwindSafe for HeaderPosition
impl Send for HeaderPosition
impl Sync for HeaderPosition
impl Unpin for HeaderPosition
impl UnsafeUnpin for HeaderPosition
impl UnwindSafe for HeaderPosition
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.