fidl_next::protocol

Trait ClientHandler

Source
pub trait ClientHandler<T: Transport> {
    // Required method
    fn on_event(&mut self, ordinal: u64, buffer: T::RecvBuffer);
}
Expand description

A type which handles incoming events for a client.

Required Methods§

Source

fn on_event(&mut self, ordinal: u64, buffer: T::RecvBuffer)

Handles a received client event.

The dispatcher 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.

Implementors§

Source§

impl<T, P, H> ClientHandler<T> for ClientAdapter<P, H>
where T: Transport, P: ClientProtocol<T, H>,