Struct ureq::Header[][src]

pub struct Header { /* fields omitted */ }

Wrapper type for a header line.

Methods

impl Header
[src]

The header name.

let header = "X-Forwarded-For: 127.0.0.1"
    .parse::<ureq::Header>()
    .unwrap();
assert_eq!("X-Forwarded-For", header.name());

The header value.

let header = "X-Forwarded-For: 127.0.0.1"
    .parse::<ureq::Header>()
    .unwrap();
assert_eq!("127.0.0.1", header.value());

Compares the given str to the header name ignoring case.

let header = "X-Forwarded-For: 127.0.0.1"
    .parse::<ureq::Header>()
    .unwrap();
assert!(header.is_name("x-forwarded-for"));

Trait Implementations

impl Clone for Header
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Header
[src]

Formats the value using the given formatter. Read more

impl FromStr for Header
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

impl Send for Header

impl Sync for Header