[−][src]Function glsp_engine::bind_rfn_macro
pub fn bind_rfn_macro<S: ToSym, ArgsWithTag, Ret, F>(
name: S,
f: F
) -> GResult<()> where
Wrapper<ArgsWithTag, Ret, F>: WrappedCall + 'static,
Binds a Rust function to a global macro.
GameLisp will perform automatic conversions for the function's parameters and return
value. See glsp::rfn
for the details.
glsp::bind_rfn_macro(name, &f)
is equivalent to:
let sym = name.to_sym()? let rfn = glsp::named_rfn(sym, &f); glsp::bind_macro(sym, Expander::RFn(rfn))