It would be convenient to write code that's generic against Leased<W, [u8]> and &mut [u8] (and Leased<R, [u8]> and &[u8]). Such a trait should live in the idol_runtime crate.
Edit: I found BufReader and BufWriter, which are close, but are reader/writer-flavored rather than array-flavored.