Enum k8s_gateway_api::HttpHeaderMatch
source · [−]pub enum HttpHeaderMatch {
Exact {
name: HttpHeaderName,
value: String,
},
RegularExpression {
name: HttpHeaderName,
value: String,
},
}
Expand description
HTTPHeaderMatch describes how to select a HTTP route by matching HTTP request headers.
name
is the name of the HTTP Header to be matched. Name matching MUST be
case insensitive. (See https://tools.ietf.org/html/rfc7230#section-3.2).
If multiple entries specify equivalent header names, only the first entry with an equivalent name MUST be considered for a match. Subsequent entries with an equivalent header name MUST be ignored. Due to the case-insensitivity of header names, “foo” and “Foo” are considered equivalent.
When a header is repeated in an HTTP request, it is implementation-specific behavior as to how this is represented. Generally, proxies should follow the guidance from the RFC: https://www.rfc-editor.org/rfc/rfc7230.html#section-3.2.2 regarding processing a repeated header, with special handling for “Set-Cookie”.
Variants
Exact
RegularExpression
Fields
name: HttpHeaderName
value: String
Since RegularExpression HeaderMatchType has custom conformance, implementations can support POSIX, PCRE or any other dialects of regular expressions. Please read the implementation’s documentation to determine the supported dialect.
Trait Implementations
sourceimpl Clone for HttpHeaderMatch
impl Clone for HttpHeaderMatch
sourcefn clone(&self) -> HttpHeaderMatch
fn clone(&self) -> HttpHeaderMatch
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for HttpHeaderMatch
impl Debug for HttpHeaderMatch
sourceimpl<'de> Deserialize<'de> for HttpHeaderMatch
impl<'de> Deserialize<'de> for HttpHeaderMatch
sourcefn 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
sourceimpl JsonSchema for HttpHeaderMatch
impl JsonSchema for HttpHeaderMatch
sourcefn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the $ref
keyword. Read more
sourceimpl PartialEq<HttpHeaderMatch> for HttpHeaderMatch
impl PartialEq<HttpHeaderMatch> for HttpHeaderMatch
sourcefn eq(&self, other: &HttpHeaderMatch) -> bool
fn eq(&self, other: &HttpHeaderMatch) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &HttpHeaderMatch) -> bool
fn ne(&self, other: &HttpHeaderMatch) -> bool
This method tests for !=
.
sourceimpl Serialize for HttpHeaderMatch
impl Serialize for HttpHeaderMatch
impl StructuralPartialEq for HttpHeaderMatch
Auto Trait Implementations
impl RefUnwindSafe for HttpHeaderMatch
impl Send for HttpHeaderMatch
impl Sync for HttpHeaderMatch
impl Unpin for HttpHeaderMatch
impl UnwindSafe for HttpHeaderMatch
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more