is there a rust trait for "this type can be written to an i/o stream as a sequence of bytes"
That is accurate, but you can keep growing the buffer between each call on the caller's side until done
-
-
I probably want something different -- the writable values themselves know how big they are, and I only want to write to the end of the buffer, not to random indexes, so I really to a writable stream or buffer, not a &mut [u8]
-
it's fine I can invent a trait for this, just wondered if there was something in std that was already what I want
- 1 more reply
New conversation -
-
-
In general there is some interplay between the traits required. And that's where combinators such as `copy_into` become particularly nice to use.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.