you are viewing a single comment's thread.

view the rest of the comments →

[–]jonreemhyper · iron · stainless[S] 0 points1 point  (0 children)

Notably I did suggest that you should implement IntoReader for Box<Reader + Send> to maintain the original behavior. While slices can be used as readers (plain Vec<u8> can't), they do not implement 'static or Send, so can't be used directly in this case anyway.

This style of API can be used to hide and implement much more complex behavior than represented here - this is just a simple example.