fluxion_stream_time/
lib.rs1#![cfg_attr(not(feature = "std"), no_std)]
74
75#[cfg(not(feature = "std"))]
76extern crate alloc;
77
78#[cfg(any(
79 all(feature = "runtime-tokio", not(target_arch = "wasm32")),
80 feature = "runtime-smol",
81 feature = "runtime-async-std",
82 feature = "runtime-embassy",
83 feature = "runtime-wasm"
84))]
85mod debounce;
86#[cfg(any(
87 all(feature = "runtime-tokio", not(target_arch = "wasm32")),
88 feature = "runtime-smol",
89 feature = "runtime-async-std",
90 feature = "runtime-embassy",
91 feature = "runtime-wasm"
92))]
93mod throttle;
94
95#[cfg(any(
96 all(feature = "runtime-tokio", not(target_arch = "wasm32")),
97 feature = "runtime-smol",
98 feature = "runtime-async-std",
99 feature = "runtime-embassy",
100 feature = "runtime-wasm"
101))]
102mod delay;
103mod instant_timestamped;
104
105#[cfg(any(
106 all(feature = "runtime-tokio", not(target_arch = "wasm32")),
107 feature = "runtime-smol",
108 feature = "runtime-async-std",
109 feature = "runtime-embassy",
110 feature = "runtime-wasm"
111))]
112mod sample;
113#[cfg(any(
114 all(feature = "runtime-tokio", not(target_arch = "wasm32")),
115 feature = "runtime-smol",
116 feature = "runtime-async-std",
117 feature = "runtime-embassy",
118 feature = "runtime-wasm"
119))]
120mod timeout;
121
122#[cfg(any(
123 all(feature = "runtime-tokio", not(target_arch = "wasm32")),
124 feature = "runtime-smol",
125 feature = "runtime-async-std",
126 feature = "runtime-embassy",
127 feature = "runtime-wasm"
128))]
129pub use debounce::DebounceExt;
130#[cfg(any(
131 all(feature = "runtime-tokio", not(target_arch = "wasm32")),
132 feature = "runtime-smol",
133 feature = "runtime-async-std",
134 feature = "runtime-embassy",
135 feature = "runtime-wasm"
136))]
137pub use throttle::ThrottleExt;
138
139#[cfg(any(
140 all(feature = "runtime-tokio", not(target_arch = "wasm32")),
141 feature = "runtime-smol",
142 feature = "runtime-async-std",
143 feature = "runtime-embassy",
144 feature = "runtime-wasm"
145))]
146pub use delay::DelayExt;
147pub use instant_timestamped::InstantTimestamped;
148#[cfg(any(
149 all(feature = "runtime-tokio", not(target_arch = "wasm32")),
150 feature = "runtime-smol",
151 feature = "runtime-async-std",
152 feature = "runtime-embassy",
153 feature = "runtime-wasm"
154))]
155pub use sample::SampleExt;
156#[cfg(any(
157 all(feature = "runtime-tokio", not(target_arch = "wasm32")),
158 feature = "runtime-smol",
159 feature = "runtime-async-std",
160 feature = "runtime-embassy",
161 feature = "runtime-wasm"
162))]
163pub use timeout::TimeoutExt;
164
165#[cfg(all(feature = "runtime-tokio", not(target_arch = "wasm32")))]
166pub use fluxion_runtime::impls::tokio::TokioRuntime;
167
168#[cfg(all(feature = "runtime-tokio", not(target_arch = "wasm32")))]
169pub type TokioTimestamped<T> = InstantTimestamped<T, TokioRuntime>;
170
171#[cfg(all(feature = "runtime-async-std", not(target_arch = "wasm32")))]
172pub use fluxion_runtime::impls::async_std::AsyncStdRuntime;
173
174#[cfg(all(feature = "runtime-async-std", not(target_arch = "wasm32")))]
175pub type AsyncStdTimestamped<T> = InstantTimestamped<T, AsyncStdRuntime>;
176
177#[cfg(all(feature = "runtime-smol", not(target_arch = "wasm32")))]
178pub use fluxion_runtime::impls::smol::SmolRuntime;
179
180#[cfg(all(feature = "runtime-smol", not(target_arch = "wasm32")))]
181pub type SmolTimestamped<T> = InstantTimestamped<T, SmolRuntime>;
182
183#[cfg(all(
184 not(feature = "runtime-tokio"),
185 not(feature = "runtime-smol"),
186 not(feature = "runtime-async-std"),
187 not(feature = "runtime-embassy"),
188 feature = "runtime-wasm"
189))]
190pub use fluxion_runtime::impls::wasm::WasmRuntime;
191
192#[cfg(all(
193 not(feature = "runtime-tokio"),
194 not(feature = "runtime-smol"),
195 not(feature = "runtime-async-std"),
196 not(feature = "runtime-embassy"),
197 feature = "runtime-wasm"
198))]
199pub type WasmTimestamped<T> = InstantTimestamped<T, WasmRuntime>;
200
201#[cfg(feature = "runtime-embassy")]
202pub use fluxion_runtime::impls::embassy::EmbassyRuntime;
203
204#[cfg(feature = "runtime-embassy")]
205pub type EmbassyTimestamped<T> = InstantTimestamped<T, EmbassyRuntime>;
206
207#[cfg(all(feature = "runtime-tokio", not(target_arch = "wasm32")))]
208pub type DefaultRuntime = fluxion_runtime::impls::tokio::TokioRuntime;
209
210#[cfg(all(
211 not(all(feature = "runtime-tokio", not(target_arch = "wasm32"))),
212 feature = "runtime-smol"
213))]
214pub type DefaultRuntime = fluxion_runtime::impls::smol::SmolRuntime;
215
216#[cfg(all(
217 not(all(feature = "runtime-tokio", not(target_arch = "wasm32"))),
218 not(feature = "runtime-smol"),
219 feature = "runtime-async-std"
220))]
221pub type DefaultRuntime = fluxion_runtime::impls::async_std::AsyncStdRuntime;
222
223#[cfg(all(
224 not(all(feature = "runtime-tokio", not(target_arch = "wasm32"))),
225 not(feature = "runtime-smol"),
226 not(feature = "runtime-async-std"),
227 feature = "runtime-embassy"
228))]
229pub type DefaultRuntime = fluxion_runtime::impls::embassy::EmbassyRuntime;
230
231#[cfg(all(
232 not(all(feature = "runtime-tokio", not(target_arch = "wasm32"))),
233 not(feature = "runtime-smol"),
234 not(feature = "runtime-async-std"),
235 not(feature = "runtime-embassy"),
236 feature = "runtime-wasm"
237))]
238pub type DefaultRuntime = fluxion_runtime::impls::wasm::WasmRuntime;