pub trait Dispatcher<A> {
// Required method
fn send<'life0, 'async_trait>(
&'life0 self,
target: A,
data: Serialized,
) -> Pin<Box<dyn Future<Output = Result<(), SimNetError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Dispatcher is a trait that defines the send operation. The send operation takes a target address and a data buffer. This method is called when the simulator is ready for the message to be received by the target address.
Required Methods§
Sourcefn send<'life0, 'async_trait>(
&'life0 self,
target: A,
data: Serialized,
) -> Pin<Box<dyn Future<Output = Result<(), SimNetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn send<'life0, 'async_trait>(
&'life0 self,
target: A,
data: Serialized,
) -> Pin<Box<dyn Future<Output = Result<(), SimNetError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a raw data blob to the given target.