pub struct AccountEventIndexer {
pub map: Arc<ExecutionInstrumentMap>,
}Fields§
§map: Arc<ExecutionInstrumentMap>Implementations§
Source§impl AccountEventIndexer
impl AccountEventIndexer
pub const fn new(map: Arc<ExecutionInstrumentMap>) -> AccountEventIndexer
Source§impl AccountEventIndexer
impl AccountEventIndexer
pub fn account_event( &self, event: UnindexedAccountEvent, ) -> Result<AccountEvent, IndexError>
pub fn snapshot( &self, snapshot: UnindexedAccountSnapshot, ) -> Result<AccountSnapshot, IndexError>
pub fn asset_balance( &self, balance: AssetBalance<AssetNameExchange>, ) -> Result<AssetBalance<AssetIndex>, IndexError>
pub fn order_snapshot( &self, order: UnindexedOrderSnapshot, ) -> Result<OrderSnapshot, IndexError>
pub fn order_response_cancel( &self, response: OrderResponseCancel<ExchangeId, AssetNameExchange, InstrumentNameExchange>, ) -> Result<OrderResponseCancel, IndexError>
pub fn order_key(&self, key: UnindexedOrderKey) -> Result<OrderKey, IndexError>
pub fn api_error( &self, error: UnindexedApiError, ) -> Result<ApiError, IndexError>
pub fn order_request<Kind>(
&self,
order: &OrderEvent<Kind, ExchangeIndex, InstrumentIndex>,
) -> Result<OrderEvent<Kind, ExchangeId, &InstrumentNameExchange>, KeyError>where
Kind: Clone,
pub fn order_error( &self, error: UnindexedOrderError, ) -> Result<OrderError, IndexError>
pub fn client_error( &self, error: UnindexedClientError, ) -> Result<ClientError, IndexError>
pub fn trade( &self, trade: Trade<QuoteAsset, InstrumentNameExchange>, ) -> Result<Trade<QuoteAsset, InstrumentIndex>, IndexError>
Trait Implementations§
Source§impl Clone for AccountEventIndexer
impl Clone for AccountEventIndexer
Source§fn clone(&self) -> AccountEventIndexer
fn clone(&self) -> AccountEventIndexer
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 Debug for AccountEventIndexer
impl Debug for AccountEventIndexer
Auto Trait Implementations§
impl Freeze for AccountEventIndexer
impl RefUnwindSafe for AccountEventIndexer
impl Send for AccountEventIndexer
impl Sync for AccountEventIndexer
impl Unpin for AccountEventIndexer
impl UnsafeUnpin for AccountEventIndexer
impl UnwindSafe for AccountEventIndexer
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