pub struct SgHttpHeaderMatchRewrite {
pub header_name: HeaderName,
pub policy: SgHttpHeaderMatchRewritePolicy,
}Fields§
§header_name: HeaderNameName 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).
policy: SgHttpHeaderMatchRewritePolicyImplementations§
Source§impl SgHttpHeaderMatchRewrite
impl SgHttpHeaderMatchRewrite
pub fn regex(name: impl Into<HeaderName>, re: Regex) -> Self
pub fn exact(name: impl Into<HeaderName>, value: impl Into<HeaderValue>) -> Self
pub fn rewrite(&self, req: &Request<SgBody>) -> Option<HeaderValue>
Trait Implementations§
Source§impl Clone for SgHttpHeaderMatchRewrite
impl Clone for SgHttpHeaderMatchRewrite
Source§fn clone(&self) -> SgHttpHeaderMatchRewrite
fn clone(&self) -> SgHttpHeaderMatchRewrite
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 SgHttpHeaderMatchRewrite
impl Debug for SgHttpHeaderMatchRewrite
Source§impl From<SgHttpHeaderMatchRewrite> for HttpRouteMatch
impl From<SgHttpHeaderMatchRewrite> for HttpRouteMatch
Source§fn from(value: SgHttpHeaderMatchRewrite) -> Self
fn from(value: SgHttpHeaderMatchRewrite) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !Freeze for SgHttpHeaderMatchRewrite
impl RefUnwindSafe for SgHttpHeaderMatchRewrite
impl Send for SgHttpHeaderMatchRewrite
impl Sync for SgHttpHeaderMatchRewrite
impl Unpin for SgHttpHeaderMatchRewrite
impl UnwindSafe for SgHttpHeaderMatchRewrite
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