lapin_async_global_executor/
lib.rs1use lapin::ConnectionProperties;
2
3#[deprecated(note = "use async-global-executor-trait directly instead")]
6pub trait LapinAsyncGlobalExecutorExt {
7 #[deprecated(note = "use async-global-executor-trait directly instead")]
8 fn with_async_global_executor(self) -> Self
9 where
10 Self: Sized;
11
12 #[cfg(feature = "async-io")]
13 #[deprecated(note = "use async-reactor-trait directly instead")]
14 fn with_async_io(self) -> Self
15 where
16 Self: Sized;
17}
18
19impl LapinAsyncGlobalExecutorExt for ConnectionProperties {
20 fn with_async_global_executor(self) -> Self {
21 self.with_executor(async_global_executor_trait::AsyncGlobalExecutor)
22 }
23
24 #[cfg(feature = "async-io")]
25 fn with_async_io(self) -> Self {
26 async_lapin::LapinAsyncIoExt::with_async_io(self)
27 }
28}