pub struct ChannelEvent {
pub id: String,
pub channel: String,
pub confirmed: bool,
pub seq: u64,
pub sent_at_ms: u64,
pub data: Payload,
}realtime or webhooks only.Expand description
A data event delivered on a subscribed channel.
id identifies the subscription it belongs to; channel is the bare channel
name (same for both feeds). confirmed says which feed it came from: true =
confirmed on-chain event, false = pending mempool transaction. Route by
id, not by the channel name. seq and sent_at_ms describe the envelope:
gap detection and server send time. data is the typed payload — match on it
to handle a specific event shape.
Fields§
§id: StringSubscription id this event belongs to.
channel: StringBare channel name.
confirmed: boolWhich feed this event came from: true = confirmed, false = pending.
seq: u64Per-connection monotonic counter, starting at 0 and incremented by one for every event frame across all subscriptions. A jump means frames were dropped.
sent_at_ms: u64Unix milliseconds when the server sent the frame. Server→client latency
is your receive time (ms) minus sent_at_ms.
data: PayloadTyped payload.
Trait Implementations§
Source§impl Clone for ChannelEvent
impl Clone for ChannelEvent
Source§fn clone(&self) -> ChannelEvent
fn clone(&self) -> ChannelEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more