pub struct CachedClient { /* private fields */ }Implementations§
Source§impl CachedClient
impl CachedClient
pub fn new(raw: Client) -> Self
pub fn with_config(raw: Client, config: CachedClientConfig) -> Self
pub fn raw(&self) -> &Client
pub async fn stocks<S: AsRef<str>>( &self, symbols: &[S], ) -> Result<HashMap<String, Snapshot>, Error>
pub async fn stock(&self, symbol: &str) -> Option<Snapshot>
pub async fn options<S: AsRef<str>>( &self, contracts: &[S], ) -> Result<HashMap<String, Snapshot>, Error>
pub async fn option(&self, contract: &str) -> Option<Snapshot>
pub async fn watch_stocks(&self, symbols: &[String])
pub async fn watch_options(&self, contracts: &[String])
pub async fn refresh_stocks(&self) -> Result<usize, Error>
pub async fn refresh_options(&self) -> Result<usize, Error>
pub async fn watch_bars(&self, request: StockBarsRequest)
pub async fn bars( &self, key: &str, ) -> Result<HashMap<String, Vec<BarPoint>>, Error>
pub async fn bar(&self, key: &str, symbol: &str) -> Option<Vec<BarPoint>>
pub async fn refresh_bars(&self, key: &str) -> Result<usize, Error>
pub async fn clear_options(&self)
pub async fn stats(&self) -> CacheStats
Auto Trait Implementations§
impl !Freeze for CachedClient
impl !RefUnwindSafe for CachedClient
impl Send for CachedClient
impl Sync for CachedClient
impl Unpin for CachedClient
impl UnsafeUnpin for CachedClient
impl !UnwindSafe for CachedClient
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