1use crate::io::IntoHalves;
2
3#[cfg(all(target_os = "linux", feature = "uring"))]
4mod net_uring;
5
6#[cfg(all(target_os = "linux", feature = "uring"))]
7pub use net_uring::*;
8
9#[cfg(not(all(target_os = "linux", feature = "uring")))]
10mod net_noring;
11
12#[cfg(not(all(target_os = "linux", feature = "uring")))]
13pub use net_noring::*;
14
15impl IntoHalves for tokio::net::TcpStream {
16 type Read = tokio::net::tcp::OwnedReadHalf;
17 type Write = tokio::net::tcp::OwnedWriteHalf;
18
19 fn into_halves(self) -> (Self::Read, Self::Write) {
20 self.into_split()
21 }
22}