#[non_exhaustive]pub struct HttpRequestMethodConditionConfig {
pub values: Option<Vec<String>>,
}
Expand description
Information about an HTTP method condition.
HTTP defines a set of request methods, also referred to as HTTP verbs. For more information, see the HTTP Method Registry. You can also define custom HTTP methods.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.values: Option<Vec<String>>
The name of the request method. The maximum size is 40 characters. The allowed characters are A-Z, hyphen (-), and underscore (_). The comparison is case sensitive. Wildcards are not supported; therefore, the method name must be an exact match.
If you specify multiple strings, the condition is satisfied if one of the strings matches the HTTP request method. We recommend that you route GET and HEAD requests in the same way, because the response to a HEAD request may be cached.
Implementations§
source§impl HttpRequestMethodConditionConfig
impl HttpRequestMethodConditionConfig
sourcepub fn values(&self) -> &[String]
pub fn values(&self) -> &[String]
The name of the request method. The maximum size is 40 characters. The allowed characters are A-Z, hyphen (-), and underscore (_). The comparison is case sensitive. Wildcards are not supported; therefore, the method name must be an exact match.
If you specify multiple strings, the condition is satisfied if one of the strings matches the HTTP request method. We recommend that you route GET and HEAD requests in the same way, because the response to a HEAD request may be cached.
If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use .values.is_none()
.
source§impl HttpRequestMethodConditionConfig
impl HttpRequestMethodConditionConfig
sourcepub fn builder() -> HttpRequestMethodConditionConfigBuilder
pub fn builder() -> HttpRequestMethodConditionConfigBuilder
Creates a new builder-style object to manufacture HttpRequestMethodConditionConfig
.
Trait Implementations§
source§impl Clone for HttpRequestMethodConditionConfig
impl Clone for HttpRequestMethodConditionConfig
source§fn clone(&self) -> HttpRequestMethodConditionConfig
fn clone(&self) -> HttpRequestMethodConditionConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl PartialEq for HttpRequestMethodConditionConfig
impl PartialEq for HttpRequestMethodConditionConfig
source§fn eq(&self, other: &HttpRequestMethodConditionConfig) -> bool
fn eq(&self, other: &HttpRequestMethodConditionConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for HttpRequestMethodConditionConfig
Auto Trait Implementations§
impl Freeze for HttpRequestMethodConditionConfig
impl RefUnwindSafe for HttpRequestMethodConditionConfig
impl Send for HttpRequestMethodConditionConfig
impl Sync for HttpRequestMethodConditionConfig
impl Unpin for HttpRequestMethodConditionConfig
impl UnwindSafe for HttpRequestMethodConditionConfig
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> 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> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more