pub trait ConnectionFactory: Send + Sync {
type Connection: UserConnection;
// Required method
fn create<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Self::Connection>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
连接工厂Trait
用于创建连接实例
Required Associated Types§
Sourcetype Connection: UserConnection
type Connection: UserConnection
连接类型