Let's see how the macro expansion functions by working through a custom macro with overlapping patterns. This macro implements a small language, designed for describing simple HTTP GET/POST tests using the hyper library. Here's a sample of what the language looks like without the enclosing macro calls:
http://google.com GET => 302http://google.com POST => 411
The first line makes a GET request to Google, and expects a return code, 302 (Moved). The second one makes a POST request to the same place, and expects a return code 411 (Length Required). This is very simplistic but quite sufficient for our purposes.
Hyper is Rust's de facto standard HTTP library, which supports both server and client operations. We're interested ...