Closed
Description
I am a bit unsure on why this shouldn't have a mutable reference to self?
The way i see it, you would usually implement this on some sort of network client, owning access to a peripheral (unix fd, SPI, I2C, Serial etc.), but most (all?) of these require a mutable reference to be able to send data. This could be fixed by wrapping the peripheral in a RefCell
, but even then there is a good chance that the client object would hold stuff like internal state etc that needs to be mutated, meaning that in my particular case, i would end up with a client object of 5 fields, all wrapped in RefCell
.
Is this intended behavior, or am i implementing something wrong in general?
Metadata
Metadata
Assignees
Labels
No labels