#[repr(i32)]pub enum HeaderMatchKind {
Exact = 0,
Regex = 1,
Present = 2,
}Expand description
How a HeaderPredicate tests the request header it names
(sozu-proxy/sozu#1253).
Variants§
Exact = 0
The header’s value equals value, byte for byte (case-sensitive).
Regex = 1
The header’s value matches the regular expression value, anchored
at both ends like a REGEX path rule: it must match the WHOLE value.
Present = 2
The header is present, whatever its value (including empty).
value must be absent.
Implementations§
Source§impl HeaderMatchKind
impl HeaderMatchKind
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 HeaderMatchKind
impl Clone for HeaderMatchKind
impl Copy for HeaderMatchKind
Source§impl Debug for HeaderMatchKind
impl Debug for HeaderMatchKind
Source§impl Default for HeaderMatchKind
impl Default for HeaderMatchKind
Source§fn default() -> HeaderMatchKind
fn default() -> HeaderMatchKind
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for HeaderMatchKind
impl<'de> Deserialize<'de> for HeaderMatchKind
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for HeaderMatchKind
Source§impl From<HeaderMatchKind> for i32
impl From<HeaderMatchKind> for i32
Source§fn from(value: HeaderMatchKind) -> i32
fn from(value: HeaderMatchKind) -> i32
Converts to this type from the input type.
Source§impl Hash for HeaderMatchKind
impl Hash for HeaderMatchKind
Source§impl Ord for HeaderMatchKind
impl Ord for HeaderMatchKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for HeaderMatchKind
impl PartialEq for HeaderMatchKind
Source§impl PartialOrd for HeaderMatchKind
impl PartialOrd for HeaderMatchKind
Source§impl Serialize for HeaderMatchKind
impl Serialize for HeaderMatchKind
impl StructuralPartialEq for HeaderMatchKind
Source§impl TryFrom<i32> for HeaderMatchKind
impl TryFrom<i32> for HeaderMatchKind
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
The type returned in the event of a conversion error.
Source§fn try_from(value: i32) -> Result<HeaderMatchKind, UnknownEnumValue>
fn try_from(value: i32) -> Result<HeaderMatchKind, UnknownEnumValue>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for HeaderMatchKind
impl RefUnwindSafe for HeaderMatchKind
impl Send for HeaderMatchKind
impl Sync for HeaderMatchKind
impl Unpin for HeaderMatchKind
impl UnsafeUnpin for HeaderMatchKind
impl UnwindSafe for HeaderMatchKind
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
Mutably borrows from an owned value. Read more
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
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.