pub struct PythLazerHistoryClient { /* private fields */ }Expand description
Client to the history service API.
Implementations§
Source§impl PythLazerHistoryClient
impl PythLazerHistoryClient
pub fn new(config: PythLazerHistoryClientConfig) -> Self
Sourcepub async fn all_symbols_metadata(&self) -> Result<Vec<SymbolMetadata>>
pub async fn all_symbols_metadata(&self) -> Result<Vec<SymbolMetadata>>
Fetch current metadata for all symbols.
Sourcepub async fn all_symbols_metadata_handle(&self) -> Result<SymbolMetadataHandle>
pub async fn all_symbols_metadata_handle(&self) -> Result<SymbolMetadataHandle>
Fetch metadata for all symbols as an auto-updating handle.
Returns an error if the initial fetch failed.
The returned SymbolMetadataHandle will be updated by a background task when the data changes.
Sourcepub async fn all_symbols_metadata_fault_tolerant_handle(
&self,
) -> SymbolMetadataHandle
pub async fn all_symbols_metadata_fault_tolerant_handle( &self, ) -> SymbolMetadataHandle
Fetch metadata for all symbols as an auto-updating handle.
The returned SymbolMetadataHandle will be updated by a background task when the data changes.
If the initial fetch failed, the handle will initially contain an empty hashmap.
Sourcepub async fn all_symbols_metadata_stream(
&self,
) -> Result<Receiver<Vec<SymbolMetadata>>>
pub async fn all_symbols_metadata_stream( &self, ) -> Result<Receiver<Vec<SymbolMetadata>>>
Fetch metadata for all symbols as a receiver.
Returns an error if the initial fetch failed. On a successful return, the channel will always contain the initial data that can be fetched immediately from the returned receiver. You should continuously poll the receiver to receive updates.
Trait Implementations§
Source§impl Clone for PythLazerHistoryClient
impl Clone for PythLazerHistoryClient
Source§fn clone(&self) -> PythLazerHistoryClient
fn clone(&self) -> PythLazerHistoryClient
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for PythLazerHistoryClient
impl !RefUnwindSafe for PythLazerHistoryClient
impl Send for PythLazerHistoryClient
impl Sync for PythLazerHistoryClient
impl Unpin for PythLazerHistoryClient
impl !UnwindSafe for PythLazerHistoryClient
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
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>
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>
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