-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
A read_to_end function in streaming::utils.
I don't want to do a method that takes or return a Bytes<N> because the whole point of the streaming API is for file that are too large and for which we don't want to have large stack allocations.
What I think we may want to have a function that reads a file and insert it to a &mut Vec, but I was not sure which type should be used?
In opcard and PIV we have a Reply wrapper type around Bytes which are themselves a wrapper around heapless::Vec<u8,N>.
Maybe we could have something like read_to_end(path, location, buffer: &mut impl Write) but I'm not sure which Write trait we should use (std::io::Write is not available in core). Maybe we should come up with our own?
Metadata
Metadata
Assignees
Labels
No labels