Mock_dervied 0.7.0 released, adds support for mocking inherited traits and static functions


We’ve just released mock_derived 0.7.0 over at mock_derived is proc macro library that generates code for mocking traits, to be used for unit testing. This was a release focusing on adding support for mocking traits that used more “advanced” language features we didn’t previously support.

Change list includes:

  • Basic support for inherited traits
  • Adding support for traits that have static methods (static methods can be mocked, similar to mocking extern “C” functions).
  • Adding the ability to mock traits that take self ownership
  • Adding support for unsafe traits
  • Adding support for ‘sized’ traits


This looks great. It’d save me a lot of boiler plate in my current projects. I look forward for it supporting stable so I can give it a go.