#[non_exhaustive]pub struct HttpHeaderConditionConfig {
pub http_header_name: Option<String>,
pub values: Option<Vec<String>>,
}
Expand description
Information about an HTTP header condition.
There is a set of standard HTTP header fields. You can also define custom HTTP header fields.
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.http_header_name: Option<String>
The name of the HTTP header field. The maximum size is 40 characters. The header name is case insensitive. The allowed characters are specified by RFC 7230. Wildcards are not supported.
You can't use an HTTP header condition to specify the host header. Use HostHeaderConditionConfig
to specify a host header condition.
values: Option<Vec<String>>
One or more strings to compare against the value of the HTTP header. The maximum size of each string is 128 characters. The comparison strings are case insensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character).
If the same header appears multiple times in the request, we search them in order until a match is found.
If you specify multiple strings, the condition is satisfied if one of the strings matches the value of the HTTP header. To require that all of the strings are a match, create one condition per string.
Implementations
sourceimpl HttpHeaderConditionConfig
impl HttpHeaderConditionConfig
sourcepub fn http_header_name(&self) -> Option<&str>
pub fn http_header_name(&self) -> Option<&str>
The name of the HTTP header field. The maximum size is 40 characters. The header name is case insensitive. The allowed characters are specified by RFC 7230. Wildcards are not supported.
You can't use an HTTP header condition to specify the host header. Use HostHeaderConditionConfig
to specify a host header condition.
sourcepub fn values(&self) -> Option<&[String]>
pub fn values(&self) -> Option<&[String]>
One or more strings to compare against the value of the HTTP header. The maximum size of each string is 128 characters. The comparison strings are case insensitive. The following wildcard characters are supported: * (matches 0 or more characters) and ? (matches exactly 1 character).
If the same header appears multiple times in the request, we search them in order until a match is found.
If you specify multiple strings, the condition is satisfied if one of the strings matches the value of the HTTP header. To require that all of the strings are a match, create one condition per string.
sourceimpl HttpHeaderConditionConfig
impl HttpHeaderConditionConfig
sourcepub fn builder() -> Builder
pub fn builder() -> Builder
Creates a new builder-style object to manufacture HttpHeaderConditionConfig
Trait Implementations
sourceimpl Clone for HttpHeaderConditionConfig
impl Clone for HttpHeaderConditionConfig
sourcefn clone(&self) -> HttpHeaderConditionConfig
fn clone(&self) -> HttpHeaderConditionConfig
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 HttpHeaderConditionConfig
impl Debug for HttpHeaderConditionConfig
sourceimpl PartialEq<HttpHeaderConditionConfig> for HttpHeaderConditionConfig
impl PartialEq<HttpHeaderConditionConfig> for HttpHeaderConditionConfig
sourcefn eq(&self, other: &HttpHeaderConditionConfig) -> bool
fn eq(&self, other: &HttpHeaderConditionConfig) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &HttpHeaderConditionConfig) -> bool
fn ne(&self, other: &HttpHeaderConditionConfig) -> bool
This method tests for !=
.
impl StructuralPartialEq for HttpHeaderConditionConfig
Auto Trait Implementations
impl RefUnwindSafe for HttpHeaderConditionConfig
impl Send for HttpHeaderConditionConfig
impl Sync for HttpHeaderConditionConfig
impl Unpin for HttpHeaderConditionConfig
impl UnwindSafe for HttpHeaderConditionConfig
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more