pub struct SensitiveHeaders { /* private fields */ }Expand description
Case-insensitive set of HTTP header names whose values should be masked in logs.
Implementations§
Source§impl SensitiveHeaders
impl SensitiveHeaders
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates an empty set (no names marked sensitive).
§Returns
New SensitiveHeaders without default names; prefer SensitiveHeaders::default for built-ins.
Sourcepub fn insert(&mut self, header_name: &str)
pub fn insert(&mut self, header_name: &str)
Inserts one header name after trimming and lowercasing; ignores empty strings.
§Parameters
header_name: Name to mark sensitive.
Sourcepub fn extend<I, S>(&mut self, headers: I)
pub fn extend<I, S>(&mut self, headers: I)
Inserts each header from the iterator via SensitiveHeaders::insert.
§Parameters
headers: Iterator of header name-like values.
Trait Implementations§
Source§impl Clone for SensitiveHeaders
impl Clone for SensitiveHeaders
Source§fn clone(&self) -> SensitiveHeaders
fn clone(&self) -> SensitiveHeaders
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 SensitiveHeaders
impl Debug for SensitiveHeaders
Source§impl Default for SensitiveHeaders
impl Default for SensitiveHeaders
Source§fn default() -> Self
fn default() -> Self
Starts with crate::DEFAULT_SENSITIVE_HEADER_NAMES pre-registered.
§Returns
Non-empty SensitiveHeaders.
Source§impl PartialEq for SensitiveHeaders
impl PartialEq for SensitiveHeaders
impl Eq for SensitiveHeaders
impl StructuralPartialEq for SensitiveHeaders
Auto Trait Implementations§
impl Freeze for SensitiveHeaders
impl RefUnwindSafe for SensitiveHeaders
impl Send for SensitiveHeaders
impl Sync for SensitiveHeaders
impl Unpin for SensitiveHeaders
impl UnsafeUnpin for SensitiveHeaders
impl UnwindSafe for SensitiveHeaders
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.