use proc_macro::TokenStream;
use syn::{parse_macro_input, DeriveInput};
mod config;
mod entity;
mod paths;
mod policy;
#[proc_macro_derive(HydraCacheEntity, attributes(hydracache))]
pub fn derive_hydracache_entity(input: TokenStream) -> TokenStream {
entity::expand(parse_macro_input!(input as DeriveInput))
.unwrap_or_else(syn::Error::into_compile_error)
.into()
}
#[proc_macro]
pub fn query_cache_policy(input: TokenStream) -> TokenStream {
policy::expand(input.into())
.unwrap_or_else(syn::Error::into_compile_error)
.into()
}