pub trait N0de: 'static + Send {
// Required methods
fn spawn(endpoint: Endpoint) -> impl Future<Output = Result<Self>> + Send
where Self: Sized;
fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send;
}
Expand description
A trait for nodes that can be spawned and shut down
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.