pub fn create_message(message_type: impl AsRef<str>) -> EmergentMessageExpand description
Create a new message with the given type.
This is a convenience factory function that matches the Python and TypeScript SDKs.
§Panics
Panics if the message type is invalid.
§Example
use emergent_client::create_message;
use serde_json::json;
let msg = create_message("timer.tick")
.with_payload(json!({"count": 1}))
.with_metadata(json!({"trace_id": "abc123"}));