pub enum UserDataEvent {
OrderUpdate(Box<OrderUpdateEvent>),
AccountUpdate(Box<AccountUpdateEvent>),
AccountConfigUpdate(AccountConfigUpdateEvent),
Unknown(Value),
}Expand description
All user data stream event types received over the WebSocket user data stream.
Deserializes from the raw JSON received over a UserDataStream.
Use UserDataStream::next_event() to receive typed events.
§Event Types
ORDER_TRADE_UPDATE→OrderUpdateACCOUNT_UPDATE→AccountUpdateACCOUNT_CONFIG_UPDATE→AccountConfigUpdate- Unknown types →
Unknown(logged as warning, never panics)
Large variants (OrderUpdate, AccountUpdate) are boxed to reduce stack size.
Variants§
OrderUpdate(Box<OrderUpdateEvent>)
Order trade update event (boxed to reduce enum stack size — US-016 clippy fix).
AccountUpdate(Box<AccountUpdateEvent>)
Account balance/position update event (boxed to reduce enum stack size — US-016 clippy fix).
AccountConfigUpdate(AccountConfigUpdateEvent)
Account configuration update event (leverage or multi-assets margin mode change).
Unknown(Value)
Unknown event type — captured as raw JSON for forward compatibility.
Trait Implementations§
Source§impl Debug for UserDataEvent
impl Debug for UserDataEvent
Source§impl<'de> Deserialize<'de> for UserDataEvent
impl<'de> Deserialize<'de> for UserDataEvent
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for UserDataEvent
impl RefUnwindSafe for UserDataEvent
impl Send for UserDataEvent
impl Sync for UserDataEvent
impl Unpin for UserDataEvent
impl UnsafeUnpin for UserDataEvent
impl UnwindSafe for UserDataEvent
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more