1use async_lapin::LapinAsyncIoExt;
2use lapin::ConnectionProperties;
3
4#[deprecated(note = "use async-executor-trait and async-reactor-trait directly instead")]
7pub trait LapinAsyncStdExt {
8 #[deprecated(note = "use async-executor-trait and async-reactor-trait directly instead")]
9 fn with_async_std(self) -> Self
10 where
11 Self: Sized,
12 {
13 self.with_async_std_executor().with_async_std_reactor()
14 }
15
16 #[deprecated(note = "use async-executor-trait directly instead")]
17 fn with_async_std_executor(self) -> Self
18 where
19 Self: Sized;
20
21 #[deprecated(note = "use async-reactor-trait directly instead")]
22 fn with_async_std_reactor(self) -> Self
23 where
24 Self: Sized;
25}
26
27impl LapinAsyncStdExt for ConnectionProperties {
28 fn with_async_std_executor(self) -> Self {
29 self.with_executor(async_executor_trait::AsyncStd)
30 }
31
32 fn with_async_std_reactor(self) -> Self {
33 self.with_async_io_reactor()
35 }
36}