ntex_net/
lib.rs

1//! Utility for async runtime abstraction
2#![deny(rust_2018_idioms, unreachable_pub, missing_debug_implementations)]
3#![allow(unused_variables, dead_code)]
4
5mod compat;
6pub mod connect;
7
8pub use ntex_io::Io;
9pub use ntex_rt::{spawn, spawn_blocking};
10
11cfg_if::cfg_if! {
12    if #[cfg(all(feature = "neon", target_os = "linux", feature = "io-uring"))] {
13        #[path = "rt_uring/mod.rs"]
14        mod rt_impl;
15        pub use self::rt_impl::{
16            from_tcp_stream, from_unix_stream, tcp_connect, tcp_connect_in, unix_connect,
17            unix_connect_in, active_stream_ops
18        };
19    } else if #[cfg(all(unix, feature = "neon"))] {
20        #[path = "rt_polling/mod.rs"]
21        mod rt_impl;
22        pub use self::rt_impl::{
23            from_tcp_stream, from_unix_stream, tcp_connect, tcp_connect_in, unix_connect,
24            unix_connect_in, active_stream_ops
25        };
26    } else {
27        pub use self::compat::*;
28    }
29}
30
31#[cfg(all(unix, feature = "neon"))]
32mod helpers;