Struct reqwest::header::HeaderView
[−]
[src]
pub struct HeaderView<'a>(_, _);
Returned with the HeadersItems
iterator.
Methods
impl<'a> HeaderView<'a>
[src]
pub fn is<H>(&self) -> bool where
H: Header,
[src]
H: Header,
Check if a HeaderView is a certain Header.
pub fn name(&self) -> &'a str
[src]
Get the Header name as a slice.
pub fn value<H>(&self) -> Option<&'a H> where
H: Header + HeaderFormat,
[src]
H: Header + HeaderFormat,
Cast the value to a certain Header type.
pub fn value_string(&self) -> String
[src]
Get just the header value as a String.
This will join multiple values of this header with a ,
.
Warning: This may not be the format that should be used to send a Request or Response.
Trait Implementations
impl<'a> Display for HeaderView<'a>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl<'a> Extend<HeaderView<'a>> for Headers
[src]
fn extend<I>(&mut self, iter: I) where
I: IntoIterator<Item = HeaderView<'a>>,
[src]
I: IntoIterator<Item = HeaderView<'a>>,
Extends a collection with the contents of an iterator. Read more
impl<'a> Debug for HeaderView<'a>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
Formats the value using the given formatter. Read more
impl<'a> FromIterator<HeaderView<'a>> for Headers
[src]
fn from_iter<I>(iter: I) -> Headers where
I: IntoIterator<Item = HeaderView<'a>>,
[src]
I: IntoIterator<Item = HeaderView<'a>>,
Creates a value from an iterator. Read more