bytedance/monoio
Tracking issue: impl `AsyncReadRent` and `AsyncWriteRent` for in-memory std buffer types
開放
#310 建立於 2024年10月21日
F-feature-requestgood first issue
倉庫指標
- 星標
- (5,000 顆星)
- PR 合併指標
- (30 天內沒有已合併 PR)
描述
Is your feature request related to a problem? Please describe.
I want to have AsyncReadRent and AsyncWriteRent implemented for in-memory std buffer types, like Vec<u8>, Cursor for testing purposes.
Describe the solution you'd like
Similar to what Tokio does:
- write: https://docs.rs/tokio/latest/tokio/io/trait.AsyncWrite.html#foreign-impls
-
Vec<u8> -
Cursor<&mut Vec<u8>> -
Cursor<&mut [u8]> -
Cursor<Box<[u8]>> -
Cursor<Vec<u8>> -
&mut T -
Box<T>
-
- read: https://docs.rs/tokio/latest/tokio/io/trait.AsyncRead.html#foreign-impls
-
&[u8] -
Cursor<T> -
&mut [T] -
Box<T>
-
Describe alternatives you've considered
No
Additional context
AsyncReadRent has been implemented for &[u8]