pub trait Node: Send + 'static {
// Provided methods
fn endpoint(&self) -> Option<&Endpoint> { ... }
fn shutdown(&mut self) -> impl Future<Output = Result<()>> + Send + '_ { ... }
}
Expand description
Trait for simulation node implementations.
Provides basic functionality for nodes including optional endpoint access and cleanup on shutdown.
For a node to be usable in a simulation, you also need to implement Spawn
for your node struct.
Provided 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.