pub trait Spawnable {
// Required method
fn spawn(self);
}Expand description
For static namespaces, the init response will be managed by the user. However, for dynamic namespaces, the socket.io client will manage the response. As it does not know the type of the response, the spawnable trait is used to spawn the response. Without the client having to know the type of the response.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".