vaas
vaas copied to clipboard
rust: Refactor uploading
- Reorder some functions for better reading flow
- Generalize for_file: Allow any type that implements a new interface "UploadData". Add a new internal function for_generic that uses UploadData-types. for_file simply forwards to for_generic, as &Path implements UploadData
- Add a new function for_buf, whose buffer also implements UploadData and hence also uses for_generic internally
- Adding support for new data types is now trivial
- Refactor SHA256 computation a bit, improve performance (more fixes coming here)
- for_stream still needs special handling, as it can't locally compute the SHA256.