pub trait DynNode:
Send
+ Any
+ 'static {
// Required methods
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
// Provided methods
fn shutdown(
&mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + '_>> { ... }
fn endpoint(&self) -> Option<&Endpoint> { ... }
}
Expand description
Trait for dynamically-typed simulation nodes.
This trait enables type erasure for nodes while preserving essential functionality like shutdown, endpoint access, and type casting.
Required Methods§
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Returns a mutable reference to this node as Any
for downcasting.