Expand description
§PFn
Provide fn_trait
’s
call
,
call_mut
, and
call_once
on Stable Rust for functions / closures with ≤ 12 arguments.
§Example Usage
use pfn::PFn;
let closure = |x: i32, y: i32, z: &str| {
println!("{}", z);
x + y
};
// Once the `fn_trait` feature has stabilized, you would do this.
// let result = closure.call((5, 42, "Hello World"));
// For now, use PFn.
let result = closure.pfn_call((5, 42, "Hello World"));