I don't see an equivalent of async pwrite/pread (write at a specified offset) in async_std or in the tokio APIs. How do folks typically deal with this? The standard RUST API does have it but of course it is synchronous.
tokio has an
AsyncRead and an
async-std similarly has async versions of
These libraries also have structs which implement these traits and are used to perform async IO. For an instance, the
File struct in
tokio implements both
AsyncWrite and can be used as-such.
Generally, async file IO is implemented by just wrapping the std call in
spawn_blocking, so you can do the same by calling the ordinary
pwrite method from within
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.