We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 61af76c commit baf540aCopy full SHA for baf540a
src/duplex.rs
@@ -123,6 +123,16 @@ impl AsyncWriteRent for DuplexStream {
123
}
124
125
126
+/// SAFETY:
127
+///
128
+/// > Users should ensure the read operations are indenpendence from the write
129
+/// > ones, the methods from AsyncReadRent and AsyncWriteRent can execute
130
+/// > concurrently.
131
132
+/// For `DuplexStream`, read and write operate on different `SimplexStream`, so
133
+/// it is definitely safe to split it out.
134
+unsafe impl monoio::io::Split for DuplexStream {}
135
+
136
#[cfg(test)]
137
mod tests {
138
use monoio::io::AsyncReadRentExt;
0 commit comments