Struct market_data::MarketClient
source · pub struct MarketClient<T: Publisher> { /* private fields */ }Expand description
MarketClient holds the Publisher
Implementations§
source§impl<T: Publisher> MarketClient<T>
impl<T: Publisher> MarketClient<T>
pub fn new(site: T) -> Self
sourcepub fn create_endpoint(self) -> MarketResult<Self>
pub fn create_endpoint(self) -> MarketResult<Self>
Creates the final query URL for the selected Provider
sourcepub fn get_data(self) -> MarketResult<Self>
pub fn get_data(self) -> MarketResult<Self>
Download the data series in the Provider format
sourcepub fn to_writer(&self, writer: impl Write) -> MarketResult<()>
pub fn to_writer(&self, writer: impl Write) -> MarketResult<()>
Write the downloaded data to anything that implements std::io::Write , like File, TcpStream, Stdout, etc
sourcepub fn transform_data(&self) -> MarketResult<MarketSeries>
pub fn transform_data(&self) -> MarketResult<MarketSeries>
Transform the downloaded Provider series into MarketSeries format
Auto Trait Implementations§
impl<T> RefUnwindSafe for MarketClient<T>where
T: RefUnwindSafe,
impl<T> Send for MarketClient<T>where
T: Send,
impl<T> Sync for MarketClient<T>where
T: Sync,
impl<T> Unpin for MarketClient<T>where
T: Unpin,
impl<T> UnwindSafe for MarketClient<T>where
T: UnwindSafe,
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