pub trait ConnectMiddleware<A: Adapter, T>:
Sized
+ Clone
+ Send
+ Sync
+ 'static {
// Required method
fn call<'a>(
&'a self,
s: Arc<Socket<A>>,
auth: &'a Option<Value>,
) -> impl Future<Output = Result<(), Box<dyn Display + Send>>> + Send;
}Expand description
Define a middleware for the connect event.
It is implemented for closures with up to 16 arguments.
They must implement the FromConnectParts trait and return Result<(), E> where E: Display.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.