-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AsyncSeek #9
Comments
An obvious async-ing of the sync version gives: pub trait Seek {
async fn seek(&mut self, pos: SeekFrom) -> Result<u64>;
async fn rewind(&mut self) -> Result<()> { ... }
async fn stream_len(&mut self) -> Result<u64> { ... }
async fn stream_position(&mut self) -> Result<u64> { ... }
} Everything must be |
I think it would be easy enough to extend the readiness proposal for read/write to seek. (We'd add a |
Note that although we should have |
Some issue spelunking around the Tokio design: To summarise the concern with I think there are slightly different expectations around async functions, though we must still consider cancellation. I think that as long as an async function is |
I found |
An async version of the Seek trait:
Prior art
futures-rs
Tokio
async-std
Extends futures-rs with a convenience
seek
functionMisc
The text was updated successfully, but these errors were encountered: