fluvio_future/
lib.rs

1#[cfg(unix)]
2pub mod file_slice;
3
4#[cfg(feature = "fs")]
5#[cfg(not(target_arch = "wasm32"))]
6pub mod fs;
7
8#[cfg(feature = "io")]
9#[cfg(not(target_arch = "wasm32"))]
10pub mod io;
11
12#[cfg(feature = "task")]
13pub mod task;
14
15#[cfg(feature = "timer")]
16pub mod timer;
17
18#[cfg(feature = "retry")]
19pub mod retry;
20
21#[cfg(any(test, feature = "fixture"))]
22mod test_util;
23
24#[cfg(any(test, feature = "fixture"))]
25pub use fluvio_future_derive::test_async;
26
27#[cfg(any(test, feature = "fixture"))]
28pub use fluvio_future_derive::test;
29
30#[cfg(all(unix, feature = "zero_copy"))]
31pub mod zero_copy;
32
33#[cfg(feature = "net")]
34pub mod net;
35
36#[cfg(all(any(unix, windows), feature = "rust_tls"))]
37pub mod rust_tls;
38
39#[cfg(all(any(unix, windows), feature = "rust_tls", not(feature = "native_tls")))]
40pub use rust_tls as tls;
41
42#[cfg(all(any(unix, windows), feature = "native_tls"))]
43pub mod native_tls;
44
45#[cfg(all(any(unix, windows), feature = "native_tls", not(feature = "rust_tls")))]
46pub use crate::native_tls as tls;
47
48#[cfg(feature = "openssl_tls")]
49#[cfg(not(target_arch = "wasm32"))]
50pub mod openssl;
51
52#[cfg(feature = "future")]
53pub mod future;
54
55#[cfg(feature = "subscriber")]
56pub mod subscriber {
57    use tracing_subscriber::EnvFilter;
58
59    pub fn init_logger() {
60        init_tracer(None);
61    }
62
63    pub fn init_tracer(level: Option<tracing::Level>) {
64        let _ = tracing_subscriber::fmt()
65            .with_max_level(level.unwrap_or(tracing::Level::DEBUG))
66            .with_env_filter(EnvFilter::from_default_env())
67            .with_writer(std::io::stderr)
68            .try_init();
69    }
70}
71
72#[cfg(feature = "doomsday")]
73#[cfg(not(target_arch = "wasm32"))]
74pub mod doomsday;
75
76#[cfg(feature = "attributes")]
77pub use fluvio_future_derive::main_async;
78
79/// re-export tracing
80pub mod tracing {
81
82    pub use tracing::*;
83}