pub struct HeaderComposer { /* private fields */ }Expand description
Composes HTTP headers with priority-based deduplication.
Custom headers (higher priority) override fingerprint headers (lower priority) when they share the same header name. Header names are compared case-insensitively.
§Example
ⓘ
let composer = HeaderComposer::new()
.with_fingerprint_headers(fp_headers)
.with_custom_headers(vec![("user-agent", "custom-ua")]);
let headers = composer.compose();
// The custom user-agent overrides the fingerprint one.Implementations§
Source§impl HeaderComposer
impl HeaderComposer
Sourcepub fn with_fingerprint_headers<I, K, V>(self, headers: I) -> Self
pub fn with_fingerprint_headers<I, K, V>(self, headers: I) -> Self
Adds fingerprint-derived headers (lower priority).
Sourcepub fn with_custom_headers<I, K, V>(self, headers: I) -> Self
pub fn with_custom_headers<I, K, V>(self, headers: I) -> Self
Adds custom headers (higher priority, override fingerprint headers).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HeaderComposer
impl RefUnwindSafe for HeaderComposer
impl Send for HeaderComposer
impl Sync for HeaderComposer
impl Unpin for HeaderComposer
impl UnsafeUnpin for HeaderComposer
impl UnwindSafe for HeaderComposer
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