You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi!
I have an actor that does some random stuff periodically. Random stuff is an async action, that requires actor itself as a mutable reference.
The problem is that I don't understand how to do that action. Rust compiler shows the error:
Simplified code is the following: (error is at
self.do_random_stuff()invocation)How to solve it? I can't figure out which design I should pick to do random stuff in an asynchronous manner.
Beta Was this translation helpful? Give feedback.
All reactions