#[non_exhaustive]pub struct OperationResponse<T> {
pub id: String,
pub op: String,
pub code: String,
pub msg: String,
pub data: Vec<T>,
pub in_time: NumberString,
pub out_time: NumberString,
pub extra: ResponseExtraFields,
}Expand description
Generic WebSocket trade-operation response body.
T is normally one of the operation result rows in crate::ws::model.
OKX docs: https://www.okx.com/docs-v5/en/#overview-websocket
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: StringClient request ID.
op: StringOperation name, e.g. order or sprd-order.
code: StringTop-level OKX response code.
msg: StringTop-level OKX response message.
data: Vec<T>Per-request result rows.
in_time: NumberStringGateway receive timestamp in microseconds.
out_time: NumberStringGateway send timestamp in microseconds.
extra: ResponseExtraFieldsFields introduced by OKX after this crate version.
Trait Implementations§
Source§impl<T: Clone> Clone for OperationResponse<T>
impl<T: Clone> Clone for OperationResponse<T>
Source§fn clone(&self) -> OperationResponse<T>
fn clone(&self) -> OperationResponse<T>
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<T: Debug> Debug for OperationResponse<T>
impl<T: Debug> Debug for OperationResponse<T>
Source§impl<T: Default> Default for OperationResponse<T>
impl<T: Default> Default for OperationResponse<T>
Source§fn default() -> OperationResponse<T>
fn default() -> OperationResponse<T>
Returns the “default value” for a type. Read more
Source§impl<'de, T> Deserialize<'de> for OperationResponse<T>where
T: Deserialize<'de> + Default,
impl<'de, T> Deserialize<'de> for OperationResponse<T>where
T: Deserialize<'de> + Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl<T> Freeze for OperationResponse<T>
impl<T> RefUnwindSafe for OperationResponse<T>where
T: RefUnwindSafe,
impl<T> Send for OperationResponse<T>where
T: Send,
impl<T> Sync for OperationResponse<T>where
T: Sync,
impl<T> Unpin for OperationResponse<T>where
T: Unpin,
impl<T> UnsafeUnpin for OperationResponse<T>
impl<T> UnwindSafe for OperationResponse<T>where
T: UnwindSafe,
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