pub enum AccountEventKind<ExchangeKey, AssetKey, InstrumentKey> {
Snapshot(AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>),
BalanceSnapshot(Snapshot<AssetBalance<AssetKey>>),
OrderSnapshot(Snapshot<Order<ExchangeKey, InstrumentKey, OrderState<AssetKey, InstrumentKey>>>),
OrderCancelled(OrderResponseCancel<ExchangeKey, AssetKey, InstrumentKey>),
Trade(Trade<QuoteAsset, InstrumentKey>),
}
Variants§
Snapshot(AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>)
Full AccountSnapshot
- replaces all existing state.
BalanceSnapshot(Snapshot<AssetBalance<AssetKey>>)
Single AssetBalance
snapshot - replaces existing balance state.
OrderSnapshot(Snapshot<Order<ExchangeKey, InstrumentKey, OrderState<AssetKey, InstrumentKey>>>)
Single Order
snapshot - used to upsert existing order state if it’s more recent.
This variant covers general order updates, and open order responses.
OrderCancelled(OrderResponseCancel<ExchangeKey, AssetKey, InstrumentKey>)
Response to an OrderRequestCancel<ExchangeKey, InstrumentKey>
.
Trade(Trade<QuoteAsset, InstrumentKey>)
Order<ExchangeKey, InstrumentKey, Open>
partial or full-fill.
Trait Implementations§
Source§impl<ExchangeKey: Clone, AssetKey: Clone, InstrumentKey: Clone> Clone for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey: Clone, AssetKey: Clone, InstrumentKey: Clone> Clone for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
Source§fn clone(&self) -> AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
fn clone(&self) -> AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<ExchangeKey: Debug, AssetKey: Debug, InstrumentKey: Debug> Debug for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey: Debug, AssetKey: Debug, InstrumentKey: Debug> Debug for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
Source§impl<'de, ExchangeKey, AssetKey, InstrumentKey> Deserialize<'de> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<'de, ExchangeKey, AssetKey, InstrumentKey> Deserialize<'de> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
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
Source§impl<ExchangeKey, AssetKey, InstrumentKey> From<AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> From<AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
Source§fn from(value: AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>) -> Self
fn from(value: AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>) -> Self
Converts to this type from the input type.
Source§impl<ExchangeKey, AssetKey, InstrumentKey> From<OrderEvent<Result<Cancelled, OrderError<AssetKey, InstrumentKey>>, ExchangeKey, InstrumentKey>> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> From<OrderEvent<Result<Cancelled, OrderError<AssetKey, InstrumentKey>>, ExchangeKey, InstrumentKey>> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
Source§fn from(
value: OrderResponseCancel<ExchangeKey, AssetKey, InstrumentKey>,
) -> Self
fn from( value: OrderResponseCancel<ExchangeKey, AssetKey, InstrumentKey>, ) -> Self
Converts to this type from the input type.
Source§impl<ExchangeKey, AssetKey, InstrumentKey> From<Snapshot<AssetBalance<AssetKey>>> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> From<Snapshot<AssetBalance<AssetKey>>> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
Source§fn from(value: Snapshot<AssetBalance<AssetKey>>) -> Self
fn from(value: Snapshot<AssetBalance<AssetKey>>) -> Self
Converts to this type from the input type.
Source§impl<ExchangeKey, AssetKey, InstrumentKey> From<Snapshot<Order<ExchangeKey, InstrumentKey, OrderState<AssetKey, InstrumentKey>>>> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> From<Snapshot<Order<ExchangeKey, InstrumentKey, OrderState<AssetKey, InstrumentKey>>>> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
Source§impl<ExchangeKey, AssetKey, InstrumentKey> From<Trade<QuoteAsset, InstrumentKey>> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> From<Trade<QuoteAsset, InstrumentKey>> for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
Source§fn from(value: Trade<QuoteAsset, InstrumentKey>) -> Self
fn from(value: Trade<QuoteAsset, InstrumentKey>) -> Self
Converts to this type from the input type.
Source§impl<ExchangeKey: PartialEq, AssetKey: PartialEq, InstrumentKey: PartialEq> PartialEq for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey: PartialEq, AssetKey: PartialEq, InstrumentKey: PartialEq> PartialEq for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
Source§fn eq(
&self,
other: &AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>,
) -> bool
fn eq( &self, other: &AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>, ) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<ExchangeKey, AssetKey, InstrumentKey> Serialize for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> Serialize for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> StructuralPartialEq for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
Auto Trait Implementations§
impl<ExchangeKey, AssetKey, InstrumentKey> Freeze for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> RefUnwindSafe for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> Send for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> Sync for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> Unpin for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> UnwindSafe for AccountEventKind<ExchangeKey, AssetKey, InstrumentKey>
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