I have been learning Rust for two weeks,There is still a lot of confusion.
It seems to be very tightly controlled in terms of global variables, I want a singleton, and then after
the GRPC handler changes or reads its value, the singleton should be global. How do I make this?
I tried to add this singleton as a member of the FilWindowPostServer, and then use "&mut self",And then it seems like the compiler reminds me that I can't use mut here
You can add it as a member to FilWindowPostServer, but to actually modify it, you will need to wrap it in some sort of Mutex, which would allow modification through &self.