Trait Spawnable

Source
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§

Source

fn spawn(self)

Spawn the response. Implementors should spawn the future with tokio::spawn if it is an async function. They should also print a tracing::error log in case of an error.

Implementations on Foreign Types§

Source§

impl Spawnable for ()

Source§

fn spawn(self)

Implementors§