#[non_exhaustive]pub struct HeaderMatch {
pub name: String,
pub value: Option<StringMatch>,
/* private fields */
}Expand description
Determines how a HTTP header should be matched.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringOptional. Specifies the name of the header in the request.
value: Option<StringMatch>Optional. Specifies how the header match will be performed.
Implementations§
Source§impl HeaderMatch
impl HeaderMatch
pub fn new() -> Self
Sourcepub fn set_value<T>(self, v: T) -> Selfwhere
T: Into<StringMatch>,
pub fn set_value<T>(self, v: T) -> Selfwhere
T: Into<StringMatch>,
Sourcepub fn set_or_clear_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<StringMatch>,
pub fn set_or_clear_value<T>(self, v: Option<T>) -> Selfwhere
T: Into<StringMatch>,
Trait Implementations§
Source§impl Clone for HeaderMatch
impl Clone for HeaderMatch
Source§fn clone(&self) -> HeaderMatch
fn clone(&self) -> HeaderMatch
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HeaderMatch
impl Debug for HeaderMatch
Source§impl Default for HeaderMatch
impl Default for HeaderMatch
Source§fn default() -> HeaderMatch
fn default() -> HeaderMatch
Returns the “default value” for a type. Read more
Source§impl Message for HeaderMatch
impl Message for HeaderMatch
Source§impl PartialEq for HeaderMatch
impl PartialEq for HeaderMatch
impl StructuralPartialEq for HeaderMatch
Auto Trait Implementations§
impl Freeze for HeaderMatch
impl RefUnwindSafe for HeaderMatch
impl Send for HeaderMatch
impl Sync for HeaderMatch
impl Unpin for HeaderMatch
impl UnsafeUnpin for HeaderMatch
impl UnwindSafe for HeaderMatch
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
Mutably borrows from an owned value. Read more