pub struct Earning { /* private fields */ }Expand description
Struct to store earning for symbol
Implementations§
Source§impl Earning
impl Earning
Sourcepub fn symbol(&self) -> &str
pub fn symbol(&self) -> &str
Return symbol of company
§Example
#[tokio::main]
async fn main() {
let api = alpha_vantage::set_api("demo", reqwest::Client::new());
let earning = api.earning("IBM").json().await.unwrap();
let symbol = earning.symbol();
assert_eq!(symbol, "IBM");
}Sourcepub fn annual_earning(&self) -> &Vec<Annual>
pub fn annual_earning(&self) -> &Vec<Annual>
Return Annual earning list for symbol
Sourcepub fn quarterly_earning(&self) -> &Vec<Quarterly>
pub fn quarterly_earning(&self) -> &Vec<Quarterly>
Return quarterly earning for symbol
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Earning
impl RefUnwindSafe for Earning
impl Send for Earning
impl Sync for Earning
impl Unpin for Earning
impl UnwindSafe for Earning
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