pub trait ServerHook:
Send
+ Sync
+ 'static {
// Required methods
fn new(ctx: &Context) -> impl Future<Output = Self> + Send;
fn handle(self, ctx: &Context) -> impl Future<Output = ()> + Send;
}Expand description
Trait for server lifecycle hooks that process connections.
ServerHook provides a unified interface for different types of connection
processing handlers in the server lifecycle.
This trait is designed to work with the server’s connection processing pipeline.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl ServerHook for DefaultHook
Implementation of ServerHook for DefaultHook.