Function metacall::metacall

source ·
pub fn metacall<T: MetacallValue>(
    func: impl ToString,
    args: impl IntoIterator<Item = impl MetacallValue>
) -> Result<T, MetacallError>
Expand description

Calls a function with arguments. The generic parameter is the return type of the function you’re calling. Checkout MetacallValue for possible types. For example: …

let sum = metacall::metacall::<i32>("sum", [1, 2]).unwrap();