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§fn clone(&self) -> CustomHeaders
fn clone(&self) -> CustomHeaders
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CustomHeaders
impl Debug for CustomHeaders
Source§impl Default for CustomHeaders
impl Default for CustomHeaders
Source§fn default() -> CustomHeaders
fn default() -> CustomHeaders
Returns the “default value” for a type. Read more
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