New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support self: Rc #21
Comments
arbitrary self types are not supported yet unfortunately. Since I have personally never used that feature I did not give it much of a priority but I now see I was mistaken. I will definitely take a look! |
I sometimes use this pattern with async methods. |
Unfortunately It seems like supporting arbitrary self types is actually pretty hard without any guarantees of soundness. I will keep this open in case I get ideas but until then only |
Interesting read. So the "mock"/"parent" owns the real object by normal ownership now, so you can do |
Hm... if they are all If we had a module level attribute this would be easier since it could scan the entire module and check all the receiver types but oh well. Thanks for the idea! I'll mull it over some and see how I feel about it. |
Cool, it just might work. Would it still work with non-mutable |
I believe so, since
Where T is |
Looks like it'll work very well, I'm more than happy with this 😃 Thank you! |
v0.0.4 is released with this feature 🎉 |
Thanks for this really cool library!
I can't get this to work:
The text was updated successfully, but these errors were encountered: