pub struct CustomHeaders(/* private fields */);Expand description
A set of pre-validated user-supplied HTTP headers.
Construction (and the per-name validation that goes with it) happens once
at settings load time. Cloning is Arc-cheap, so providers can hand a copy
to each outgoing request without re-parsing or re-allocating.
Implementations§
Source§impl CustomHeaders
impl CustomHeaders
pub fn new(headers: Vec<(HeaderName, HeaderValue)>) -> Self
pub fn is_empty(&self) -> bool
pub fn iter(&self) -> impl ExactSizeIterator<Item = (&HeaderName, &HeaderValue)>
Trait Implementations§
Source§impl Clone for CustomHeaders
impl Clone for CustomHeaders
Source§impl Debug for CustomHeaders
impl Debug for CustomHeaders
Source§impl Default for CustomHeaders
impl Default for CustomHeaders
Auto Trait Implementations§
impl Freeze for CustomHeaders
impl RefUnwindSafe for CustomHeaders
impl Send for CustomHeaders
impl Sync for CustomHeaders
impl Unpin for CustomHeaders
impl UnsafeUnpin for CustomHeaders
impl UnwindSafe for CustomHeaders
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