Struct noir::HttpHeader [] [src]

pub struct HttpHeader {
    // some fields omitted
}

An abstraction over different hyper::Header implementations.

Used by the headers![...] macro to easily create a vector containing different types that implement the hyper::Header trait.

Test Failure Examples

From test_headers_expected_mismatch ()

Response Failure: GET request to "http://localhost:4000/get/hello" returned 1 error(s)   1) Response header "Server" does not match, expected:   "Servername Foo"   but got:   "Servername"   difference:   "Servername Foo"

From test_headers_unexpected_mismatch ()

Response Failure: GET request to "http://localhost:4000/get/hello" returned 1 error(s)   1) Response header "Server" was expected to be absent, but is present.

Trait Implementations

impl<H: Header + HeaderFormat> From<H> for HttpHeader
[src]

fn from(header: H) -> HttpHeader

Converts a implementation of the hyper::Header trait into a abstract representation suitable for use within a Vec.