pub struct AccountSnapshot<ExchangeKey = ExchangeIndex, AssetKey = AssetIndex, InstrumentKey = InstrumentIndex> {
pub exchange: ExchangeKey,
pub balances: Vec<AssetBalance<AssetKey>>,
pub instruments: Vec<InstrumentAccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>>,
}
Fields§
§exchange: ExchangeKey
§balances: Vec<AssetBalance<AssetKey>>
§instruments: Vec<InstrumentAccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>>
Implementations§
Source§impl<ExchangeKey, AssetKey, InstrumentKey> AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
pub const fn new( exchange: ExchangeKey, balances: Vec<AssetBalance<AssetKey>>, instruments: Vec<InstrumentAccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>>, ) -> AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
Source§impl<ExchangeKey, AssetKey, InstrumentKey> AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
pub fn time_most_recent(&self) -> Option<DateTime<Utc>>
pub fn assets(&self) -> impl Iterator<Item = &AssetKey>
pub fn instruments(&self) -> impl Iterator<Item = &InstrumentKey>
Trait Implementations§
Source§impl<ExchangeKey: Clone, AssetKey: Clone, InstrumentKey: Clone> Clone for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey: Clone, AssetKey: Clone, InstrumentKey: Clone> Clone for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
Source§fn clone(&self) -> AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
fn clone(&self) -> AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
Returns a copy 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 AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey: Debug, AssetKey: Debug, InstrumentKey: Debug> Debug for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
Source§impl<'de, ExchangeKey, AssetKey, InstrumentKey> Deserialize<'de> for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<'de, ExchangeKey, AssetKey, InstrumentKey> Deserialize<'de> for AccountSnapshot<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 From<AccountSnapshot<ExchangeId, AssetNameExchange, InstrumentNameExchange>> for AccountState
impl From<AccountSnapshot<ExchangeId, AssetNameExchange, InstrumentNameExchange>> for AccountState
Source§fn from(value: UnindexedAccountSnapshot) -> Self
fn from(value: UnindexedAccountSnapshot) -> Self
Converts to this type from the input type.
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: Hash, AssetKey: Hash, InstrumentKey: Hash> Hash for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey: Hash, AssetKey: Hash, InstrumentKey: Hash> Hash for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
Source§impl<ExchangeKey: Ord, AssetKey: Ord, InstrumentKey: Ord> Ord for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey: Ord, AssetKey: Ord, InstrumentKey: Ord> Ord for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
Source§fn cmp(
&self,
other: &AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>,
) -> Ordering
fn cmp( &self, other: &AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>, ) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<ExchangeKey: PartialEq, AssetKey: PartialEq, InstrumentKey: PartialEq> PartialEq for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey: PartialEq, AssetKey: PartialEq, InstrumentKey: PartialEq> PartialEq for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
Source§fn eq(
&self,
other: &AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>,
) -> bool
fn eq( &self, other: &AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>, ) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.Source§impl<ExchangeKey: PartialOrd, AssetKey: PartialOrd, InstrumentKey: PartialOrd> PartialOrd for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey: PartialOrd, AssetKey: PartialOrd, InstrumentKey: PartialOrd> PartialOrd for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
Source§impl<ExchangeKey, AssetKey, InstrumentKey> Serialize for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> Serialize for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey: Eq, AssetKey: Eq, InstrumentKey: Eq> Eq for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> StructuralPartialEq for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
Auto Trait Implementations§
impl<ExchangeKey, AssetKey, InstrumentKey> Freeze for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>where
ExchangeKey: Freeze,
impl<ExchangeKey, AssetKey, InstrumentKey> RefUnwindSafe for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> Send for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> Sync for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> Unpin for AccountSnapshot<ExchangeKey, AssetKey, InstrumentKey>
impl<ExchangeKey, AssetKey, InstrumentKey> UnwindSafe for AccountSnapshot<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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.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