Derive [AsyncRead
] and [AsyncWrite
].
If the struct has only one field, [AsyncRead
] and [AsyncWrite
] are derived
for that field.
```rust use derivetokioio::{AsyncRead, AsyncWrite}; use tokio::net::TcpStream;
struct Wrapper { stream: TcpStream, } ```
Generics are supported.
```rust use derivetokioio::{AsyncRead, AsyncWrite};
struct Wrapper
If the struct has multiple fields, #[async_read]
and #[async_write]
must be used once for any field.
```rust use derivetokioio::{AsyncRead, AsyncWrite};
struct Wrapper
Everything works the same way for tuple structs.
```rust use derivetokioio::{AsyncRead, AsyncWrite};
struct Wrapper
This project is licensed under the MIT license.