pub struct SendMessageParams {
pub event_type: String,
pub payload: Value,
pub idempotency_key: Option<String>,
pub channels: Option<Vec<String>>,
}Expand description
Parameters for MessagesClient::send.
§Example
use nautilus_rs::{Relay, SendMessageParams};
use serde_json::json;
let relay = Relay::new("vrn_relay_live_sk_…");
let msg = relay.messages().send(SendMessageParams {
event_type: "order.placed".into(),
payload: json!({ "order_id": "ord_123", "total": 49.99 }),
idempotency_key: Some("ord_123-placed".into()),
channels: Some(vec!["primary".into()]),
}).await?;Fields§
§event_type: StringThe event type to dispatch (e.g. "order.placed").
payload: ValueArbitrary JSON payload delivered to all subscribed endpoints.
idempotency_key: Option<String>Optional idempotency key — reusing the same key within the deduplication window returns the original message instead of creating a new one.
channels: Option<Vec<String>>Restrict delivery to the named channels. None delivers to all channels.
Trait Implementations§
Source§impl Clone for SendMessageParams
impl Clone for SendMessageParams
Source§fn clone(&self) -> SendMessageParams
fn clone(&self) -> SendMessageParams
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SendMessageParams
impl Debug for SendMessageParams
Source§impl Default for SendMessageParams
impl Default for SendMessageParams
Source§fn default() -> SendMessageParams
fn default() -> SendMessageParams
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SendMessageParams
impl RefUnwindSafe for SendMessageParams
impl Send for SendMessageParams
impl Sync for SendMessageParams
impl Unpin for SendMessageParams
impl UnsafeUnpin for SendMessageParams
impl UnwindSafe for SendMessageParams
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more