Tokio uring and write_all

Hello to all,

I'm trying to use the new way of doing async io in file with tokio_uring

My old code is a scrappers of images of a webpage (i'm downloading comics)

The problem is when i have to change my old code that write the image to a file to this new library

i get this error:

error[E0599]: the method write_all exists for struct tokio_uring::fs::File, but its trait bounds were not satisfied

i'm looking at the API and i only see write_at, and not write_all

(but my problem/question is that i have a reqwest Client) that i get some chunk of a image in asyncronous way)

I have to get the size of the chunk to do a write_at, and allways tell the exact position of the chunk? I have to get a integer to know how many bytes i have written?

This is a very new crate, my old code is functioning with tokio::io: async ways (i¡m not very sure i will get more benefits of doing this change)

Thanks in advance

I don't think there is a write_all method at the moment. You will need to call it repeatedly.

The error you posted is reported for all types, no matter if they have it or not. It's a poor error message that happens for extension traits.

Ok, i will wait one month aprox. and see the development of this crate, but now i know the posible solution (i was in the good direction)

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.