#[non_exhaustive]pub struct PushResponse<T> {
pub arg: Arg,
pub action: String,
pub event_type: String,
pub cur_page: Option<u32>,
pub last_page: Option<bool>,
pub data: Vec<T>,
pub extra: ResponseExtraFields,
}Expand description
Generic channel data-push response body.
T is the channel row type from crate::ws::model.
OKX docs: https://www.okx.com/docs-v5/en/#overview-websocket-subscribe
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.arg: ArgSubscription argument identifying the channel and filters.
action: StringPush action, commonly snapshot or update.
Used by most channels. For the positions channel OKX uses
Self::event_type instead.
event_type: StringEvent type used by the positions channel.
Values: snapshot (initial / regular snapshot push) or
event_update (event-driven update). Empty string for channels
that use Self::action instead.
cur_page: Option<u32>Current page number for paginated snapshot pushes.
Only present on positions snapshot events (eventType = "snapshot").
last_page: Option<bool>Whether this is the last page of a paginated snapshot push.
Only present on positions snapshot events (eventType = "snapshot").
data: Vec<T>Typed channel rows.
extra: ResponseExtraFieldsFields introduced by OKX after this crate version.
Trait Implementations§
Source§impl<T: Clone> Clone for PushResponse<T>
impl<T: Clone> Clone for PushResponse<T>
Source§fn clone(&self) -> PushResponse<T>
fn clone(&self) -> PushResponse<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more