ThouCheese / cloud-storage-rs

A crate for uploading files to Google cloud storage, and for generating download urls.
MIT License
123 stars 88 forks source link

ObjectClient.list has an annoying return type #104

Open db48x opened 2 years ago

db48x commented 2 years ago

It returns a Stream of Result<ObjectList>, which on one level is fine because it is exactly what Google makes available. At least for my use–case it would simplify things if there were a method that returned a Stream of Object instead.

ThouCheese commented 2 years ago

How would you deal with failures with such an api? Do you want to have the Stream<Result<ObjectList>> swapped for a Result<Stream<ObjectList>>?

ThouCheese commented 2 years ago

Maybe we can add an example of how to go from one to the other to the documentation?