Struct k8s_gateway_api::HttpRouteMatch
source · [−]pub struct HttpRouteMatch {
pub path: Option<HttpPathMatch>,
pub headers: Option<Vec<HttpHeaderMatch>>,
pub query_params: Option<Vec<HttpQueryParamMatch>>,
pub method: Option<HttpMethod>,
}
Expand description
HTTPRouteMatch defines the predicate used to match requests to a given action. Multiple match types are ANDed together, i.e. the match will evaluate to true only if all conditions are satisfied.
For example, the match below will match a HTTP request only if its path
starts with /foo
AND it contains the version: v1
header:
match:
path:
value: "/foo"
headers:
- name: "version"
value "v1"
Fields
path: Option<HttpPathMatch>
Path specifies a HTTP request path matcher. If this field is not specified, a default prefix match on the “/” path is provided.
headers: Option<Vec<HttpHeaderMatch>>
Headers specifies HTTP request header matchers. Multiple match values are ANDed together, meaning, a request must match all the specified headers to select the route.
query_params: Option<Vec<HttpQueryParamMatch>>
QueryParams specifies HTTP query parameter matchers. Multiple match values are ANDed together, meaning, a request must match all the specified query parameters to select the route.
method: Option<HttpMethod>
Method specifies HTTP method matcher.
When specified, this route will be matched only if the request has the specified method.
Support: Extended
Trait Implementations
sourceimpl Clone for HttpRouteMatch
impl Clone for HttpRouteMatch
sourcefn clone(&self) -> HttpRouteMatch
fn clone(&self) -> HttpRouteMatch
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 HttpRouteMatch
impl Debug for HttpRouteMatch
sourceimpl Default for HttpRouteMatch
impl Default for HttpRouteMatch
sourcefn default() -> HttpRouteMatch
fn default() -> HttpRouteMatch
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for HttpRouteMatch
impl<'de> Deserialize<'de> for HttpRouteMatch
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 HttpRouteMatch
impl JsonSchema for HttpRouteMatch
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<HttpRouteMatch> for HttpRouteMatch
impl PartialEq<HttpRouteMatch> for HttpRouteMatch
sourcefn eq(&self, other: &HttpRouteMatch) -> bool
fn eq(&self, other: &HttpRouteMatch) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &HttpRouteMatch) -> bool
fn ne(&self, other: &HttpRouteMatch) -> bool
This method tests for !=
.
sourceimpl Serialize for HttpRouteMatch
impl Serialize for HttpRouteMatch
impl StructuralPartialEq for HttpRouteMatch
Auto Trait Implementations
impl RefUnwindSafe for HttpRouteMatch
impl Send for HttpRouteMatch
impl Sync for HttpRouteMatch
impl Unpin for HttpRouteMatch
impl UnwindSafe for HttpRouteMatch
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