pub use self::accept::Accept;
pub use self::allow::Allow;
pub use self::authorization::Authorization;
pub use self::cache_control::CacheControl;
pub use self::cookie::Cookies;
pub use self::connection::Connection;
pub use self::content_length::ContentLength;
pub use self::content_type::ContentType;
pub use self::date::Date;
pub use self::etag::Etag;
pub use self::expires::Expires;
pub use self::host::Host;
pub use self::last_modified::LastModified;
pub use self::if_modified_since::IfModifiedSince;
pub use self::location::Location;
pub use self::transfer_encoding::TransferEncoding;
pub use self::upgrade::Upgrade;
pub use self::user_agent::UserAgent;
pub use self::vary::Vary;
pub use self::server::Server;
pub use self::set_cookie::SetCookie;
macro_rules! bench_header(
($name:ident, $ty:ty, $value:expr) => {
#[cfg(test)]
mod $name {
use test::Bencher;
use super::*;
use header::{Header, HeaderFormatter};
#[bench]
fn bench_parse(b: &mut Bencher) {
let val = $value;
b.iter(|| {
let _: $ty = Header::parse_header(val[]).unwrap();
});
}
#[bench]
fn bench_format(b: &mut Bencher) {
let val: $ty = Header::parse_header($value[]).unwrap();
let fmt = HeaderFormatter(&val);
b.iter(|| {
format!("{}", fmt);
});
}
}
}
);
macro_rules! deref(
($from:ty -> $to:ty) => {
impl Deref<$to> for $from {
fn deref<'a>(&'a self) -> &'a $to {
&self.0
}
}
impl DerefMut<$to> for $from {
fn deref_mut<'a>(&'a mut self) -> &'a mut $to {
&mut self.0
}
}
}
);
pub mod accept;
pub mod allow;
pub mod authorization;
pub mod cache_control;
pub mod cookie;
pub mod connection;
pub mod content_length;
pub mod content_type;
pub mod date;
pub mod etag;
pub mod expires;
pub mod host;
pub mod last_modified;
pub mod if_modified_since;
pub mod location;
pub mod server;
pub mod set_cookie;
pub mod transfer_encoding;
pub mod upgrade;
pub mod user_agent;
pub mod vary;
pub mod util;