pub fn encode_payload_for_event(payload: &[u8]) -> (PayloadEncoding, String)Expand description
Choose how to show an opaque payload to the model, and say which was chosen.
Text that is genuinely readable is shown as text; anything else is hex. The choice is
reported in the event as payload_encoding, so the model can echo the same value back in
its action and the round trip is symmetric.