Skip to main content

MessageDispatch

Trait MessageDispatch 

Source
pub trait MessageDispatch {
    // Required method
    fn dispatch(
        &self,
        header: &MessageHeader,
        buffer: &[u8],
    ) -> Result<(), DecodeError>;
}
Expand description

Trait for message dispatching based on template ID.

This trait allows routing messages to appropriate handlers based on the template ID in the message header.

Required Methods§

Source

fn dispatch( &self, header: &MessageHeader, buffer: &[u8], ) -> Result<(), DecodeError>

Dispatches a message to the appropriate handler.

§Arguments
  • header - Message header
  • buffer - Full message buffer (including header)
§Returns

Result indicating success or failure of dispatch.

Implementors§