macro_rules! query_info_data {
($name:ident $($info_type:ident: $content:ty, )+) => { ... };
}Expand description
Internal helper macro to easily generate fields & methods for QueryInfoData.
Builds:
- The enum with the specified name, with variants for each info type specified. This includes:
- A method to get the info type of the enum variant -
info_type(). - A method to get the name of the enum variant -
name(). - implementations of
From<ContentType>for each content type. - Methods to unwrap the content type, named
as_<variant_name_in_snake_case>().
- A generic struct names
Raw<name>to hold the raw data, with a method to convert it to the actual data.