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 an error if the inner encoder rejects the [OrderEventAny::Filled] variant, or if MessagePack rejects the inner payload for another variant.