pub trait ClientHandler<T: Transport> {
// Required method
fn on_event(
&mut self,
sender: &ClientSender<T>,
ordinal: u64,
buffer: T::RecvBuffer,
);
}
Expand description
A type which handles incoming events for a client.
Required Methods§
Sourcefn on_event(
&mut self,
sender: &ClientSender<T>,
ordinal: u64,
buffer: T::RecvBuffer,
)
fn on_event( &mut self, sender: &ClientSender<T>, ordinal: u64, buffer: T::RecvBuffer, )
Handles a received client event.
The client cannot handle more messages until on_event
completes. If on_event
may block,
perform asynchronous work, or take a long time to process a message, it should offload work
to an async task.