ruva_core/bus_components/
executor.rs1use downcast_rs::{impl_downcast, Downcast};
2
3pub trait TConnection: Send + Sync + Downcast {}
4
5#[cfg(feature = "sqlx-postgres")]
6impl TConnection for &'static sqlx::postgres::PgPool {}
7#[cfg(feature = "sqlx-postgres")]
8impl TConnection for Box<&'static sqlx::postgres::PgPool> {}
9
10#[cfg(feature = "sqlx-postgres")]
11impl TConnection for sqlx::postgres::PgPool {}
12#[cfg(feature = "sqlx-postgres")]
13impl TConnection for Box<sqlx::postgres::PgPool> {}
14
15#[cfg(feature = "sqlx-postgres")]
16impl TConnection for &'static mut sqlx::PgConnection {}
17#[cfg(feature = "sqlx-postgres")]
18impl TConnection for Box<&'static mut sqlx::PgConnection> {}
19
20impl_downcast!(TConnection);