0

Reqwest is built on top of Hyper which includes a header! macro to create custom headers. Is there a way I can access the header! macro without explicitly including Hyper as a separate crate?

#[macro_use] extern crate reqwest;

header! { (XRequestGuid, "X-Request-Guid") => [String] }

cannot find macro header! in this scope

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366

1 Answers1

0

No, you must directly import a macro to be able to use it. This is the same behavior as functions, types, and traits.

See also:

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366