#[non_exhaustive]pub struct FinancialData<F: Format = Both> {Show 30 fields
pub current_price: Option<F::Value<f64>>,
pub current_ratio: Option<F::Value<f64>>,
pub debt_to_equity: Option<F::Value<f64>>,
pub earnings_growth: Option<F::Value<f64>>,
pub ebitda: Option<F::Value<i64>>,
pub ebitda_margins: Option<F::Value<f64>>,
pub financial_currency: Option<String>,
pub free_cashflow: Option<F::Value<i64>>,
pub gross_margins: Option<F::Value<f64>>,
pub gross_profits: Option<F::Value<i64>>,
pub max_age: Option<i64>,
pub number_of_analyst_opinions: Option<F::Value<i64>>,
pub operating_cashflow: Option<F::Value<i64>>,
pub operating_margins: Option<F::Value<f64>>,
pub profit_margins: Option<F::Value<f64>>,
pub quick_ratio: Option<F::Value<f64>>,
pub recommendation_key: Option<String>,
pub recommendation_mean: Option<F::Value<f64>>,
pub return_on_assets: Option<F::Value<f64>>,
pub return_on_equity: Option<F::Value<f64>>,
pub revenue_growth: Option<F::Value<f64>>,
pub revenue_per_share: Option<F::Value<f64>>,
pub target_high_price: Option<F::Value<f64>>,
pub target_low_price: Option<F::Value<f64>>,
pub target_mean_price: Option<F::Value<f64>>,
pub target_median_price: Option<F::Value<f64>>,
pub total_cash: Option<F::Value<i64>>,
pub total_cash_per_share: Option<F::Value<f64>>,
pub total_debt: Option<F::Value<i64>>,
pub total_revenue: Option<F::Value<i64>>,
}Expand description
Financial data and key metrics
Contains financial ratios, margins, cash flow, and analyst recommendations.
The type parameter F controls how numeric fields are represented:
FinancialData/FinancialData<Both>— default; fields holdFormattedValue<T>FinancialData<Raw>— fields holdTdirectly (e.g.Option<f64>)FinancialData<Pretty>— fields holdOption<String>(human-readable)
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.current_price: Option<F::Value<f64>>Current stock price
current_ratio: Option<F::Value<f64>>Current ratio (current assets / current liabilities)
debt_to_equity: Option<F::Value<f64>>Debt to equity ratio
earnings_growth: Option<F::Value<f64>>Earnings growth rate
ebitda: Option<F::Value<i64>>EBITDA (Earnings Before Interest, Taxes, Depreciation, and Amortization)
ebitda_margins: Option<F::Value<f64>>EBITDA margins
financial_currency: Option<String>Currency code for financial data
free_cashflow: Option<F::Value<i64>>Free cash flow
gross_margins: Option<F::Value<f64>>Gross profit margins
gross_profits: Option<F::Value<i64>>Total gross profits
max_age: Option<i64>Maximum age of data in seconds
number_of_analyst_opinions: Option<F::Value<i64>>Number of analyst opinions
operating_cashflow: Option<F::Value<i64>>Operating cash flow
operating_margins: Option<F::Value<f64>>Operating margins
profit_margins: Option<F::Value<f64>>Profit margins
quick_ratio: Option<F::Value<f64>>Quick ratio (quick assets / current liabilities)
recommendation_key: Option<String>Recommendation key (e.g., “buy”, “hold”, “sell”)
recommendation_mean: Option<F::Value<f64>>Mean analyst recommendation (1.0 = strong buy, 5.0 = sell)
return_on_assets: Option<F::Value<f64>>Return on assets (ROA)
return_on_equity: Option<F::Value<f64>>Return on equity (ROE)
revenue_growth: Option<F::Value<f64>>Revenue growth rate
Revenue per share
target_high_price: Option<F::Value<f64>>Highest analyst price target
target_low_price: Option<F::Value<f64>>Lowest analyst price target
target_mean_price: Option<F::Value<f64>>Mean analyst price target
target_median_price: Option<F::Value<f64>>Median analyst price target
total_cash: Option<F::Value<i64>>Total cash and cash equivalents
Total cash per share
total_debt: Option<F::Value<i64>>Total debt
total_revenue: Option<F::Value<i64>>Total revenue
Implementations§
Source§impl FinancialData<Both>
impl FinancialData<Both>
Sourcepub fn into_raw(self) -> FinancialData<Raw>
pub fn into_raw(self) -> FinancialData<Raw>
Convert into a Raw view, extracting .raw from each FormattedValue field.
Sourcepub fn as_raw(&self) -> FinancialData<Raw>
pub fn as_raw(&self) -> FinancialData<Raw>
Clone and convert into a Raw view.
Sourcepub fn into_pretty(self) -> FinancialData<Pretty>
pub fn into_pretty(self) -> FinancialData<Pretty>
Convert into a Pretty view, extracting .fmt from each FormattedValue field.
Sourcepub fn as_pretty(&self) -> FinancialData<Pretty>
pub fn as_pretty(&self) -> FinancialData<Pretty>
Clone and convert into a Pretty view.
Trait Implementations§
Source§impl<F: Clone + Format> Clone for FinancialData<F>
impl<F: Clone + Format> Clone for FinancialData<F>
Source§fn clone(&self) -> FinancialData<F>
fn clone(&self) -> FinancialData<F>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<F: Debug + Format> Debug for FinancialData<F>
impl<F: Debug + Format> Debug for FinancialData<F>
Source§impl<F: Default + Format> Default for FinancialData<F>
impl<F: Default + Format> Default for FinancialData<F>
Source§fn default() -> FinancialData<F>
fn default() -> FinancialData<F>
Source§impl<'de, F: Format> Deserialize<'de> for FinancialData<F>
impl<'de, F: Format> Deserialize<'de> for FinancialData<F>
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>,
Source§impl From<FinancialData> for FinancialData<Raw>
impl From<FinancialData> for FinancialData<Raw>
Source§fn from(v: FinancialData<Both>) -> Self
fn from(v: FinancialData<Both>) -> Self
Source§impl From<FinancialData> for FinancialData<Pretty>
impl From<FinancialData> for FinancialData<Pretty>
Source§fn from(v: FinancialData<Both>) -> Self
fn from(v: FinancialData<Both>) -> Self
Source§impl<F: PartialEq + Format> PartialEq for FinancialData<F>
impl<F: PartialEq + Format> PartialEq for FinancialData<F>
Source§impl<F: Format> Serialize for FinancialData<F>
impl<F: Format> Serialize for FinancialData<F>
impl<F: PartialEq + Format> StructuralPartialEq for FinancialData<F>
Source§impl Translatable for FinancialData
impl Translatable for FinancialData
Source§fn visit_translatable(&mut self, visit: &mut dyn FnMut(&mut String))
fn visit_translatable(&mut self, visit: &mut dyn FnMut(&mut String))
Source§fn after_translate(&mut self)
fn after_translate(&mut self)
Auto Trait Implementations§
impl<F> Freeze for FinancialData<F>
impl<F> RefUnwindSafe for FinancialData<F>where
Option<<F as Format>::Value<f64>>: RefUnwindSafe,
Option<<F as Format>::Value<i64>>: RefUnwindSafe,
impl<F> Send for FinancialData<F>
impl<F> Sync for FinancialData<F>
impl<F> Unpin for FinancialData<F>
impl<F> UnsafeUnpin for FinancialData<F>where
Option<<F as Format>::Value<f64>>: UnsafeUnpin,
Option<<F as Format>::Value<i64>>: UnsafeUnpin,
impl<F> UnwindSafe for FinancialData<F>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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