pub trait MagicArgs { // Required method fn apply<C, T>(self, f: C) -> C::Output where C: Callable<Self, T>, Self: Sized; }
A convinience trait to provide the args.apply(f) syntax.
args.apply(f)
Apply f on self.
self
Equivalent to: apply(f, self).
apply(f, self)
See: apply.
apply
fn f(x: i32) -> i32 { x + 1 } let y = ("🦀", 41).apply(f); assert_eq!(y, 42);