Calling Bytes::is_unique on a Message's Bytes instance always (seemingly at least) returns false, making it impossible to get a &mut [u8] of said Bytes instance without copying it. That, from what i could understand reading bytes's documentation, means that tungstenite keeps references to the messsage bytes somewhere inside. I need at least mutable (better owned) access to all bytes i receive, and copying everything passing over the websocket connection is a giant waste. Where does tungstenite store those references (or does it at all?), and how can i make it not do that (or otherwise give me the ownership of the message bytes)? Thank you.
Calling
Bytes::is_uniqueon aMessage'sBytesinstance always (seemingly at least) returnsfalse, making it impossible to get a&mut [u8]of saidBytesinstance without copying it. That, from what i could understand readingbytes's documentation, means thattungstenitekeeps references to the messsage bytes somewhere inside. I need at least mutable (better owned) access to all bytes i receive, and copying everything passing over the websocket connection is a giant waste. Where doestungstenitestore those references (or does it at all?), and how can i make it not do that (or otherwise give me the ownership of the message bytes)? Thank you.