pub trait ConnectionHandler:
Send
+ Sync
+ 'static {
// Required method
fn handle<'a>(&'a self, connection: Connection) -> HandlerFuture<'a>;
}Required Methods§
fn handle<'a>(&'a self, connection: Connection) -> HandlerFuture<'a>
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl<F, Fut> ConnectionHandler for Fwhere
F: Fn(Connection) -> Fut + Send + Sync + 'static,
Fut: Future<Output = HandlerResult> + Send + 'static,
Available on crate features
async or sync only.