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_stream(
&self,
) -> Result<impl Stream<Item = Vec<SymbolMetadata>> + Unpin>
pub async fn all_symbols_metadata_stream( &self, ) -> Result<impl Stream<Item = Vec<SymbolMetadata>> + Unpin>
Creates a fault-tolerant stream that requests the list of symbols and yields new items when a change of value occurs.
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 stream. You should continuously poll the stream to receive updates.
Sourcepub async fn state(&self, params: GetStateParams) -> Result<State>
pub async fn state(&self, params: GetStateParams) -> Result<State>
Fetch a partial state snapshot containing data specified in params.
Sourcepub async fn state_stream(
&self,
params: GetStateParams,
) -> Result<impl Stream<Item = State> + Unpin>
pub async fn state_stream( &self, params: GetStateParams, ) -> Result<impl Stream<Item = State> + Unpin>
Fetch a part of the current state specified by params.
Creates a fault-tolerant stream that requests a partial state snapshot
containing data specified in params. It yields new items
when a change of value occurs.
Returns an error if the initial fetch failed. On a successful return, the stream will always contain the initial data that can be fetched immediately from the returned stream. You should continuously poll the stream 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