Trait MessageProcessor

Source
pub trait MessageProcessor:
    Send
    + Sync
    + 'static {
    type Output: Send + Clone + Sync + 'static + Debug;

    // Required method
    fn process_message(
        &mut self,
        message: ResponseMessage,
    ) -> Option<Self::Output>;
}
Expand description

Trait for processing incoming Betfair streaming ResponseMessage objects into user-defined outputs.

Implementers can filter or transform messages and control which messages are forwarded to the client sink.

Required Associated Types§

Source

type Output: Send + Clone + Sync + 'static + Debug

The processed message type produced by process_message

Required Methods§

Source

fn process_message(&mut self, message: ResponseMessage) -> Option<Self::Output>

Process an incoming ResponseMessage.

Returns Some(Output) to forward a processed message, or None to drop it.

Implementors§