Skip to main content

HeaderMatcher

Type Alias HeaderMatcher 

Source
pub type HeaderMatcher = Arc<dyn Fn(&str) -> Option<String> + Send + Sync>;
Expand description

A handler for matching and transforming headers.

It takes a header name (as a string slice) and returns an Option<String>.

  • Some(new_name): Renames the header to new_name (or keeps it if identical).
  • None: Removes the header.

Aliased Typeยง

pub struct HeaderMatcher { /* private fields */ }