pub struct MockQuoteSource { /* private fields */ }Expand description
Mock quote source for testing - allows manual quote injection.
Implementations§
Trait Implementations§
Source§impl Default for MockQuoteSource
impl Default for MockQuoteSource
Source§impl QuoteSource for MockQuoteSource
impl QuoteSource for MockQuoteSource
Source§fn poll_quotes<'life0, 'life1, 'async_trait>(
&'life0 self,
instruments: &'life1 [InstrumentId],
) -> Pin<Box<dyn Future<Output = Vec<Quote>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn poll_quotes<'life0, 'life1, 'async_trait>(
&'life0 self,
instruments: &'life1 [InstrumentId],
) -> Pin<Box<dyn Future<Output = Vec<Quote>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get current quotes for the given instruments
Source§fn last_quote(&self, instrument: &InstrumentId) -> Option<Quote>
fn last_quote(&self, instrument: &InstrumentId) -> Option<Quote>
Get the last known quote for an instrument (if cached)
Source§fn current_time_ms(&self) -> i64
fn current_time_ms(&self) -> i64
Get current time
Auto Trait Implementations§
impl Freeze for MockQuoteSource
impl RefUnwindSafe for MockQuoteSource
impl Send for MockQuoteSource
impl Sync for MockQuoteSource
impl Unpin for MockQuoteSource
impl UnsafeUnpin for MockQuoteSource
impl UnwindSafe for MockQuoteSource
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