pub trait Call<T> {
type Output;
// Required method
fn call(&self, args: T) -> Self::Output;
}
Expand description
Call a Fn
and unpack the arguments.
fn foo(a: u32, b: &str) { }
foo.call((1, "hi"));
foo.call(T2(1, "hi"));
pub trait Call<T> {
type Output;
// Required method
fn call(&self, args: T) -> Self::Output;
}
Call a Fn
and unpack the arguments.
fn foo(a: u32, b: &str) { }
foo.call((1, "hi"));
foo.call(T2(1, "hi"));