pub struct SensitiveHttpHeaders { /* private fields */ }Expand description
Case-insensitive set of HTTP header names whose values should be masked in logs.
Implementations§
Source§impl SensitiveHttpHeaders
impl SensitiveHttpHeaders
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates an empty set (no names marked sensitive).
§Returns
New SensitiveHttpHeaders without default names; prefer
SensitiveHttpHeaders::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 SensitiveHttpHeaders::insert.
§Parameters
headers: Iterator of header name-like values.
Sourcepub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns whether no sensitive names are registered.
§Returns
true if SensitiveHttpHeaders::len is zero.
Trait Implementations§
Source§impl Clone for SensitiveHttpHeaders
impl Clone for SensitiveHttpHeaders
Source§fn clone(&self) -> SensitiveHttpHeaders
fn clone(&self) -> SensitiveHttpHeaders
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 SensitiveHttpHeaders
impl Debug for SensitiveHttpHeaders
Source§impl Default for SensitiveHttpHeaders
impl Default for SensitiveHttpHeaders
Source§fn default() -> Self
fn default() -> Self
Starts with crate::DEFAULT_SENSITIVE_HEADER_NAMES pre-registered.
§Returns
Non-empty SensitiveHttpHeaders.
Source§impl PartialEq for SensitiveHttpHeaders
impl PartialEq for SensitiveHttpHeaders
impl Eq for SensitiveHttpHeaders
impl StructuralPartialEq for SensitiveHttpHeaders
Auto Trait Implementations§
impl Freeze for SensitiveHttpHeaders
impl RefUnwindSafe for SensitiveHttpHeaders
impl Send for SensitiveHttpHeaders
impl Sync for SensitiveHttpHeaders
impl Unpin for SensitiveHttpHeaders
impl UnsafeUnpin for SensitiveHttpHeaders
impl UnwindSafe for SensitiveHttpHeaders
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.