I want to use a
std::io::Cursor on a
Vec<u8> sitting behind a
Mutex to gain the Read/Write traits on that
Vec. Yet since Read/Write/… are only implemented on
Cursor<Vec<u8>> and not on
Cursor<T: DerefMut<Target=Vec<u8>>> I do not see any way for me to use it.
I could just copy paste the code the implements
Cursor<<Vec<u8>> and just reimplement it, but that seems less than ideal. Shouldn’t
Cursor be implemented on
DerefMut? Or at least on
Note: Read/Write is implemented on
Cursor<&'a mut [u8]> but that, obviously, doesn’t allow the Write impl to actually change the size of the slice making it less than ideal.
edit: Fixed formatting