pub trait ConnFactory<C>:
Send
+ Sync
+ 'static {
// Required method
fn connect(&self) -> ConnFuture<C>;
}Expand description
Factory that produces a fresh connection on demand.
The factory is invoked from the pool whenever a slot needs a new connection. Implementations typically wrap a target address and produce TCP or QUIC connections; tests inject failure-injecting factories.
Required Methods§
Sourcefn connect(&self) -> ConnFuture<C>
fn connect(&self) -> ConnFuture<C>
Build a fresh connection.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".