pub struct NullAsyncProvider;Expand description
A no-op async provider that returns no data
Useful as a default when no provider is configured.
Trait Implementations§
Source§impl AsyncDataProvider for NullAsyncProvider
impl AsyncDataProvider for NullAsyncProvider
Source§fn load<'a>(
&'a self,
query: &'a DataQuery,
) -> Pin<Box<dyn Future<Output = Result<DataFrame, AsyncDataError>> + Send + 'a>>
fn load<'a>( &'a self, query: &'a DataQuery, ) -> Pin<Box<dyn Future<Output = Result<DataFrame, AsyncDataError>> + Send + 'a>>
Load historical data matching the query Read more
Source§fn has_data(&self, _symbol: &str, _timeframe: &Timeframe) -> bool
fn has_data(&self, _symbol: &str, _timeframe: &Timeframe) -> bool
Check if data is available for a symbol/timeframe combination Read more
Source§fn timeframes(&self, symbol: &str) -> Vec<Timeframe>
fn timeframes(&self, symbol: &str) -> Vec<Timeframe>
List available timeframes for a symbol Read more
Source§fn subscribe(
&self,
symbol: &str,
timeframe: &Timeframe,
) -> Result<Receiver<DataFrame>, AsyncDataError>
fn subscribe( &self, symbol: &str, timeframe: &Timeframe, ) -> Result<Receiver<DataFrame>, AsyncDataError>
Subscribe to live bar updates Read more
Source§fn unsubscribe(
&self,
symbol: &str,
timeframe: &Timeframe,
) -> Result<(), AsyncDataError>
fn unsubscribe( &self, symbol: &str, timeframe: &Timeframe, ) -> Result<(), AsyncDataError>
Unsubscribe from live updates Read more
Source§impl Clone for NullAsyncProvider
impl Clone for NullAsyncProvider
Source§fn clone(&self) -> NullAsyncProvider
fn clone(&self) -> NullAsyncProvider
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 NullAsyncProvider
impl Debug for NullAsyncProvider
Source§impl Default for NullAsyncProvider
impl Default for NullAsyncProvider
Source§fn default() -> NullAsyncProvider
fn default() -> NullAsyncProvider
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for NullAsyncProvider
impl RefUnwindSafe for NullAsyncProvider
impl Send for NullAsyncProvider
impl Sync for NullAsyncProvider
impl Unpin for NullAsyncProvider
impl UnsafeUnpin for NullAsyncProvider
impl UnwindSafe for NullAsyncProvider
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