macro_rules! with_http_methods {
($states:ident) => {
$states! {
get => Get, "GET",
post => Post, "POST",
put => Put, "PUT",
patch => Patch, "PATCH",
delete => Delete, "DELETE",
head => Head, "HEAD",
options => Options, "OPTIONS",
trace => Trace, "TRACE",
connect => Connect, "CONNECT",
}
};
}
macro_rules! with_output_kinds {
($states:ident) => {
$states! {
json => JsonOut, JsonOutAlg, Json, "JSON",
file => FileOut, FileOutAlg, File, "streamed-file",
text => TextOut, TextOutAlg, Text, "plain-text",
html => HtmlOut, HtmlOutAlg, Html, "HTML",
bytes => BytesOut, BytesOutAlg, Bytes, "raw-byte",
empty => EmptyOut, EmptyOutAlg, Empty, "empty",
redirect => RedirectOut, RedirectOutAlg, Redirect, "redirect",
stream => StreamOut, StreamOutAlg, Stream, "streamed",
}
};
}