pub fn server_macro_impl(
args: TokenStream,
body: TokenStream,
server_fn_path: Option<Path>,
default_path: &str,
preset_server: Option<Type>,
default_protocol: Option<Type>,
) -> Result<TokenStream>Expand description
The implementation of the server macro.
ⓘ
#[proc_macro_attribute]
pub fn server(args: proc_macro::TokenStream, s: TokenStream) -> TokenStream {
match server_macro_impl(
args.into(),
s.into(),
Some(syn::parse_quote!(my_crate::exports::server_fn)),
) {
Err(e) => e.to_compile_error().into(),
Ok(s) => s.to_token_stream().into(),
}
}