[−][src]Function glsp_engine::rfn
pub fn rfn(wrapped_fn: WrappedFn) -> RFn
Creates a GameLisp value which represents a Rust function.
The wrapped_fn
parameter should be constructed using the rfn!()
macro.
When binding a Rust function to a global variable, it's usually more convenient to use
glsp::bind_rfn
instead.
Functions at the same address are deduplicated. For example, repeated calls to
glsp::rfn("swap-bytes", i32::swap_bytes)
will return the same RFn
every time.