pub trait AsyncStream:
AsyncRead
+ AsyncWrite
+ 'static
+ Send
+ Sync {
// Provided method
fn poll_read_alloc(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<IoResult<Vec<u8>>> { ... }
}pub trait AsyncStream:
AsyncRead
+ AsyncWrite
+ 'static
+ Send
+ Sync {
// Provided method
fn poll_read_alloc(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<IoResult<Vec<u8>>> { ... }
}