Skip to main content

v_common/runtime_wrapper/
mod.rs

1// src/runtime_wrapper/mod.rs
2
3// Убедимся, что включена ровно одна фича
4#[cfg(not(any(feature = "tokio_0_2", feature = "tokio_1")))]
5compile_error!("Either feature \"tokio_0_2\" or \"tokio_1\" must be enabled for this crate.");
6
7#[cfg(all(feature = "tokio_0_2", feature = "tokio_1"))]
8compile_error!("Features \"tokio_0_2\" and \"tokio_1\" cannot be enabled at the same time.");
9
10#[cfg(feature = "tokio_0_2")]
11pub mod tokio_0_2;
12#[cfg(feature = "tokio_0_2")]
13pub use tokio_0_2::RuntimeWrapper;
14
15#[cfg(feature = "tokio_1")]
16pub mod tokio_1;
17#[cfg(feature = "tokio_1")]
18pub use tokio_1::RuntimeWrapper;