Skip to main content


I'm amazed by what the #RustLang #mockall crate achieves, but this one little remark to generic methods pretty much prevents a significant portion of the use cases I have for it: "The only restrictions on mocking generic methods are that all generic parameters must be 'static, and generic lifetime parameters are not allowed.". https://docs.rs/mockall/#generic-methods
This entry was edited (1 year ago)
I am very curious, did you find an alternative to solve this issue, or even better something that can mock structs from external crates?
@Ugvx Didn't work a lot in that context since then, so no alternative solutions available from my side for now. 🤷
@Ugvx
⇧