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.