I'm trying to implement my own HTTP header using the impl_header macro from the hypermarket, but it doesn't seem to be able to resolve the hyper::header module.
Here is my code:
#[macro_use] extern crate hyper; use hyper::header; struct CustomHeader; impl_header!(CustomHeader, "value", String);
And here is the compiler error:
<hyper macros>:11:14: 11:20 error: unresolved import `header::HeaderFormat`. Maybe a missing `extern crate header`? <hyper macros>:11 Result { use header:: HeaderFormat ; self . fmt_header ( f ) } } } ^~~~~~ <hyper macros>:1:1: 11:67 note: in expansion of impl_header! lib.rs:4:1: 4:45 note: expansion site error: aborting due to previous error Could not compile `macro_issue`.
Any clue why this is happening and how can I fix it?
thanks
source share