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
Hello.
I was trying to implement a hey_listen::rc::DispatcherRequest with the intention of being able to modify the internal state of the listener.
But noticed the signature of the on_event method defines self as immutable:
What should be a better approach of what I'm trying to achieve?
Move the state out of the listener and modify it from it?
If I'm not mistaken this would also require a mutable reference to self.
Hello.
I was trying to implement a
hey_listen::rc::DispatcherRequest
with the intention of being able to modify the internal state of the listener.But noticed the signature of the on_event method defines self as immutable:
What should be a better approach of what I'm trying to achieve?
Move the state out of the listener and modify it from it?
If I'm not mistaken this would also require a mutable reference to self.
Interior mutability maybe?
The text was updated successfully, but these errors were encountered: