Skip to main content

encode_order_event_any

Function encode_order_event_any 

Source
pub fn encode_order_event_any(
    event: &OrderEventAny,
) -> Result<EncodedPayload, EncodeError>
Expand description

Encodes an [OrderEventAny] envelope by dispatching on the inner variant.

The captured entry’s payload_type matches the inner-variant tag (e.g. OrderFilled rather than OrderEventAny); the serialized payload is the inner variant.

§Errors

Returns the inner encoder’s EncodeError for the [OrderEventAny::Filled] variant; other variants return EncodeError::Serialize when MessagePack rejects the inner payload.