Trait hytra::FnAcc [−][src]
This is workaround for the fact that the Fn trait is not stable.
We could have TrAcc<T, F: Fn(T, T) -> T>
. However, since the Fn
trait is not stable, this
would not allow to have TrAcc
for an accumulator other than a closure (which makes the type
un-namable) or a function pointer (which means dynamic dispatch).
The FnAcc
is a custom trait that we use as a purpose-specific variant of Fn(T, T) -> T
.