funcall/lib.rs
1pub use funcall_macros::funcall;
2
3#[macro_export]
4macro_rules! tools {
5 ( $( $fn_name:ident ),* $(,)? ) => {{
6 let mut map: ::std::collections::HashMap<&'static str, fn(&::serde_json::Value) -> ::serde_json::Value> = ::std::collections::HashMap::new();
7 $(
8 map.insert(stringify!($fn_name), $crate::paste::paste! { [<$fn_name _tool>] } as fn(&::serde_json::Value) -> ::serde_json::Value);
9 )*
10 map
11 }};
12}
13
14pub use paste;