Push return value of fn as parameter to vector

Hi Guys,

I am trying to write a simple function that wraps my function call with a status bar from scratch. The status bar is working fine I just need help getting this to work.

Is this somehow possible?
My plan is to extend the function to take a vector of arguments and number of how often the wrapped function gets called.

Please point me in the right direction
Thanks in advance

You need a type for that. playground

struct Call {
    count: usize,

impl Call {
    fn call(&mut self, f: fn(&mut FooBar, x: i32), (foobar, v): (&mut FooBar, i32)) {
        self.count += 1;
        // rest

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.