pub fn encode_position_event(
event: &PositionEvent,
) -> Result<EncodedPayload, EncodeError>Expand description
Encodes a [PositionEvent] envelope by dispatching on the variant.
publish_position_event hands the bus tap a [PositionEvent] wrapper, so the tap
dispatches by the wrapper’s std::any::TypeId and the inner variants never reach
their bare-type encoders. The dispatcher unwraps each variant, encodes the inner
struct, and stamps the inner-variant tag so forensics scans see entries identical
to the bare-type capture path.
§Errors
Returns the inner encoder’s EncodeError when MessagePack rejects the inner
payload.