Open mkeeter opened 3 months ago
Seems reasonable. The only reason the existing API uses read/writer flavors is because that's what the code needed when I wrote the API --- in the interest of not adding speculative features before they're used. A random-access variant would make perfect sense.
It would be convenient to write code that's generic against
Leased<W, [u8]>
and&mut [u8]
(andLeased<R, [u8]>
and&[u8]
). Such a trait should live in theidol_runtime
crate.Edit: I found
BufReader
andBufWriter
, which are close, but are reader/writer-flavored rather than array-flavored.