pub struct MockExchangeRequest {
pub time_request: DateTime<Utc>,
pub kind: MockExchangeRequestKind,
}Fields§
§time_request: DateTime<Utc>§kind: MockExchangeRequestKindImplementations§
Source§impl MockExchangeRequest
impl MockExchangeRequest
pub fn new(time_request: DateTime<Utc>, kind: MockExchangeRequestKind) -> Self
pub fn fetch_account_snapshot( time_request: DateTime<Utc>, response_tx: Sender<UnindexedAccountSnapshot>, ) -> Self
pub fn fetch_balances( time_request: DateTime<Utc>, assets: Vec<AssetNameExchange>, response_tx: Sender<Vec<AssetBalance<AssetNameExchange>>>, ) -> Self
pub fn fetch_orders_open( time_request: DateTime<Utc>, instruments: Vec<InstrumentNameExchange>, response_tx: Sender<Vec<Order<ExchangeId, InstrumentNameExchange, Open>>>, ) -> Self
pub fn fetch_trades( time_request: DateTime<Utc>, response_tx: Sender<Vec<Trade<AssetNameExchange, InstrumentNameExchange>>>, time_since: DateTime<Utc>, ) -> Self
pub fn cancel_order( time_request: DateTime<Utc>, response_tx: Sender<UnindexedOrderResponseCancel>, request: OrderRequestCancel<ExchangeId, InstrumentNameExchange>, ) -> Self
pub fn open_order( time_request: DateTime<Utc>, response_tx: Sender<Order<ExchangeId, InstrumentNameExchange, UnindexedOrderState>>, request: OrderRequestOpen<ExchangeId, InstrumentNameExchange>, market_prices: MarketPrices, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockExchangeRequest
impl !RefUnwindSafe for MockExchangeRequest
impl Send for MockExchangeRequest
impl Sync for MockExchangeRequest
impl Unpin for MockExchangeRequest
impl UnsafeUnpin for MockExchangeRequest
impl !UnwindSafe for MockExchangeRequest
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