pub struct MockDataClient {
pub client_id: ClientId,
pub venue: Venue,
/* private fields */
}
Fields§
§client_id: ClientId
§venue: Venue
Implementations§
Trait Implementations§
Source§impl DataClient for MockDataClient
impl DataClient for MockDataClient
Source§fn subscribe(
&mut self,
_data_type: &DataType,
_params: &Option<HashMap<String, String>>,
) -> Result<()>
fn subscribe( &mut self, _data_type: &DataType, _params: &Option<HashMap<String, String>>, ) -> Result<()>
Parse command and call specific function
fn client_id(&self) -> ClientId
fn venue(&self) -> Option<Venue>
fn start(&self)
fn stop(&self)
fn reset(&self)
fn dispose(&self)
fn is_connected(&self) -> bool
fn is_disconnected(&self) -> bool
fn subscribe_instruments( &mut self, _venue: Option<&Venue>, _params: &Option<HashMap<String, String>>, ) -> Result<()>
fn subscribe_instrument( &mut self, _instrument_id: &InstrumentId, _params: &Option<HashMap<String, String>>, ) -> Result<()>
fn subscribe_order_book_deltas( &mut self, _instrument_id: &InstrumentId, _book_type: BookType, _depth: Option<usize>, _params: &Option<HashMap<String, String>>, ) -> Result<()>
fn subscribe_order_book_snapshots( &mut self, instrument_id: &InstrumentId, book_type: BookType, depth: Option<usize>, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn subscribe_quote_ticks( &mut self, instrument_id: &InstrumentId, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn subscribe_trade_ticks( &mut self, instrument_id: &InstrumentId, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn subscribe_bars( &mut self, bar_type: &BarType, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn subscribe_instrument_status( &mut self, instrument_id: &InstrumentId, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn subscribe_instrument_close( &mut self, instrument_id: &InstrumentId, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn unsubscribe( &mut self, data_type: &DataType, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn unsubscribe_instruments( &mut self, venue: Option<&Venue>, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn unsubscribe_instrument( &mut self, instrument_id: &InstrumentId, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn unsubscribe_order_book_deltas( &mut self, instrument_id: &InstrumentId, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn unsubscribe_order_book_snapshots( &mut self, instrument_id: &InstrumentId, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn unsubscribe_quote_ticks( &mut self, instrument_id: &InstrumentId, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn unsubscribe_trade_ticks( &mut self, instrument_id: &InstrumentId, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn unsubscribe_bars( &mut self, bar_type: &BarType, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn unsubscribe_instrument_status( &mut self, instrument_id: &InstrumentId, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn unsubscribe_instrument_close( &mut self, instrument_id: &InstrumentId, params: &Option<HashMap<String, String>>, ) -> Result<()>
fn request_data(&self, request: DataRequest)
fn request_instruments( &self, correlation_id: UUID4, venue: Venue, start: Option<UnixNanos>, end: Option<UnixNanos>, params: &Option<HashMap<String, String>>, ) -> Vec<InstrumentAny>
fn request_instrument( &self, correlation_id: UUID4, instrument_id: InstrumentId, start: Option<UnixNanos>, end: Option<UnixNanos>, params: &Option<HashMap<String, String>>, ) -> InstrumentAny
fn request_order_book_snapshot( &self, correlation_id: UUID4, instrument_id: InstrumentId, depth: Option<usize>, params: &Option<HashMap<String, String>>, ) -> Payload
fn request_quote_ticks( &self, correlation_id: UUID4, instrument_id: InstrumentId, start: Option<UnixNanos>, end: Option<UnixNanos>, limit: Option<usize>, params: &Option<HashMap<String, String>>, ) -> Vec<QuoteTick>
fn request_trade_ticks( &self, correlation_id: UUID4, instrument_id: InstrumentId, start: Option<UnixNanos>, end: Option<UnixNanos>, limit: Option<usize>, params: &Option<HashMap<String, String>>, ) -> Vec<TradeTick>
fn request_bars( &self, correlation_id: UUID4, bar_type: BarType, start: Option<UnixNanos>, end: Option<UnixNanos>, limit: Option<usize>, params: &Option<HashMap<String, String>>, ) -> Vec<Bar>
Auto Trait Implementations§
impl Freeze for MockDataClient
impl !RefUnwindSafe for MockDataClient
impl !Send for MockDataClient
impl !Sync for MockDataClient
impl Unpin for MockDataClient
impl !UnwindSafe for MockDataClient
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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