Closed sjames closed 3 years ago
@Tim-Zhang
Hi @sjames,
The change will cause the incompatible and we did not encounter similar needs
Can you provied more information, why do you need this?
I want to modify the members of the structure when handling the server functions. It would have been convenient to have a mutable self so I could mutate the members.
I worked around this by creating an inner struct of type
inner std::sync::Arc<std::sync::RwLock<Inner>>
I can mutate the contents of inner after taking a write lock. Perhaps this is indeed the right way to do it. I suggest you can close the ticket.
Thank you, Regards, Sojan
OK
Description of problem
The generated server trait uses a &self. Method calls coming into the server can modify state. It is not currently possible to modify state due to the &self. I believe this should be &mut self for the server trait.
Expected result
The generated trait functions for the server should use &mut self.
Actual result
The generated trait functions for the server uses &self.