Struct yahoo_finance_api::YResponse
source · pub struct YResponse {
pub chart: YChart,
}
Fields§
§chart: YChart
Implementations§
source§impl YResponse
impl YResponse
pub fn from_json(json: Value) -> Result<YResponse, YahooError>
sourcepub fn last_quote(&self) -> Result<Quote, YahooError>
pub fn last_quote(&self) -> Result<Quote, YahooError>
Return the latest valid quote
pub fn quotes(&self) -> Result<Vec<Quote>, YahooError>
pub fn metadata(&self) -> Result<YMetaData, YahooError>
sourcepub fn splits(&self) -> Result<Vec<Split>, YahooError>
pub fn splits(&self) -> Result<Vec<Split>, YahooError>
This method retrieves information about the splits that might have occured during the considered time period
sourcepub fn dividends(&self) -> Result<Vec<Dividend>, YahooError>
pub fn dividends(&self) -> Result<Vec<Dividend>, YahooError>
This method retrieves information about the dividends that have been recorded during the considered time period.
Note: Date is the ex-dividend date)
sourcepub fn capital_gains(&self) -> Result<Vec<CapitalGain>, YahooError>
pub fn capital_gains(&self) -> Result<Vec<CapitalGain>, YahooError>
This method retrieves information about the capital gains that might have occured during the considered time period (available only for Mutual Funds)
Trait Implementations§
source§impl<'de> Deserialize<'de> for YResponse
impl<'de> Deserialize<'de> for YResponse
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl RefUnwindSafe for YResponse
impl Send for YResponse
impl Sync for YResponse
impl Unpin for YResponse
impl UnwindSafe for YResponse
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