Hey, I wanted to be able to loop over a list of consumers and add them to a basic_consume, this pull request allows that. There were a few breaking changes but (to me) they seem to allow more flexibility.
Breaking change: Removal of ConsumerCallBackFn The impl Consumer for ConsumerCallBackFn is covered by the changed impl<F> Consumer for F where F: FnMut(...)
Breaking change: Removal of the box wrapper around the existing FnMut impl for Consumer. This was required for the blanket impl of all boxed consumers, removing the box has also allowed passing in of the closure directly, which is nice for usability.
Possible Breaking Change: I've had to add the 'static lifetime to the impl<F> Consumer for F where F: FnMut(...). I'm not confident enough to say this will not break something, but since basic_consume requires Consumer + 'static I guess that this would be safe.
Hey, I wanted to be able to loop over a list of consumers and add them to a basic_consume, this pull request allows that. There were a few breaking changes but (to me) they seem to allow more flexibility.
Breaking change: Removal of
ConsumerCallBackFn
Theimpl Consumer for ConsumerCallBackFn
is covered by the changedimpl<F> Consumer for F where F: FnMut(...)
Breaking change: Removal of the box wrapper around the existing FnMut impl for Consumer. This was required for the blanket impl of all boxed consumers, removing the box has also allowed passing in of the closure directly, which is nice for usability. Possible Breaking Change: I've had to add the 'static lifetime to theimpl<F> Consumer for F where F: FnMut(...)
. I'm not confident enough to say this will not break something, but sincebasic_consume
requiresConsumer + 'static
I guess that this would be safe.