pub enum StateEvents {
Account(AccountEvent),
Error(OrderError),
Exchange(ExchangeEvent),
Order(OrderEvent),
Perpetual(PerpetualEvent),
Position(PositionEvent),
Trade(Trade),
}Expand description
Exchange state processing events.
This is a subset of crate::abi::dex::Exchange::ExchangeEvents covering
all state mutations and order request error responses handled by SDK,
with numeric system conversions applied.
Variants§
Account(AccountEvent)
Account state updated.
Error(OrderError)
Order request processing error.
Exchange(ExchangeEvent)
Exchange state or configuration updated.
Order(OrderEvent)
Order book state updated.
Perpetual(PerpetualEvent)
Perpetual contract state or configuration updated.
Position(PositionEvent)
Position state updated.
Trade(Trade)
Trade happened.
Implementations§
Source§impl StateEvents
impl StateEvents
pub fn as_account_event(&self) -> Option<AccountEvent>
pub fn as_error(&self) -> Option<OrderError>
pub fn as_order_event(&self) -> Option<OrderEvent>
pub fn as_exchange_event(&self) -> Option<ExchangeEvent>
pub fn as_perpetual_event(&self) -> Option<PerpetualEvent>
pub fn as_position_event(&self) -> Option<PositionEvent>
pub fn as_trade(&self) -> Option<Trade>
Trait Implementations§
Source§impl Clone for StateEvents
impl Clone for StateEvents
Source§fn clone(&self) -> StateEvents
fn clone(&self) -> StateEvents
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 moreAuto Trait Implementations§
impl Freeze for StateEvents
impl RefUnwindSafe for StateEvents
impl Send for StateEvents
impl Sync for StateEvents
impl Unpin for StateEvents
impl UnsafeUnpin for StateEvents
impl UnwindSafe for StateEvents
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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