structured_map/
lib.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! The `structured_map` macro allows users of the macro to generate structured
//! maps with a known and finite set of keys that they can perform map functions
//! on such as `map`, `zip`, `iter` and much more.

mod handler;
mod types;

// TODO(docs)
#[proc_macro]
pub fn structured_map(
    input: proc_macro::TokenStream,
) -> proc_macro::TokenStream {
    handler::handle_structured_map(proc_macro2::TokenStream::from(input))
        .unwrap_or_else(|err| err.to_compile_error())
        .into()
}