[][src]Function glsp::bind_rfn_macro

pub fn bind_rfn_macro<S, ArgsWithTag, Ret, F>(
    name: S,
    f: F
) -> Result<(), GError> where
    S: ToSym,
    Wrapper<ArgsWithTag, Ret, F>: WrappedCall,
    Wrapper<ArgsWithTag, Ret, F>: '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))