#[non_exhaustive]pub struct EquityPerformance {
pub max_age: Option<i64>,
pub benchmark: Option<Benchmark>,
pub performance_overview: Option<PerformanceOverview>,
pub performance_overview_benchmark: Option<PerformanceOverview>,
}Expand description
Equity performance data comparing stock returns to benchmark
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.max_age: Option<i64>Maximum age of the data in seconds
benchmark: Option<Benchmark>Benchmark information
performance_overview: Option<PerformanceOverview>Stock performance overview across multiple time periods
performance_overview_benchmark: Option<PerformanceOverview>Benchmark performance overview for comparison
Implementations§
Source§impl EquityPerformance
impl EquityPerformance
Sourcepub fn ytd_return(&self) -> Option<f64>
pub fn ytd_return(&self) -> Option<f64>
Returns the stock’s year-to-date return percentage
Sourcepub fn benchmark_ytd_return(&self) -> Option<f64>
pub fn benchmark_ytd_return(&self) -> Option<f64>
Returns the benchmark’s year-to-date return percentage
Sourcepub fn ytd_vs_benchmark(&self) -> Option<f64>
pub fn ytd_vs_benchmark(&self) -> Option<f64>
Returns the stock’s outperformance vs benchmark for YTD (positive = outperforming)
Sourcepub fn one_year_return(&self) -> Option<f64>
pub fn one_year_return(&self) -> Option<f64>
Returns the stock’s 1-year total return percentage
Sourcepub fn benchmark_one_year_return(&self) -> Option<f64>
pub fn benchmark_one_year_return(&self) -> Option<f64>
Returns the benchmark’s 1-year total return percentage
Sourcepub fn one_year_vs_benchmark(&self) -> Option<f64>
pub fn one_year_vs_benchmark(&self) -> Option<f64>
Returns the stock’s outperformance vs benchmark for 1 year (positive = outperforming)
Sourcepub fn five_year_return(&self) -> Option<f64>
pub fn five_year_return(&self) -> Option<f64>
Returns the stock’s 5-year total return percentage
Sourcepub fn benchmark_five_year_return(&self) -> Option<f64>
pub fn benchmark_five_year_return(&self) -> Option<f64>
Returns the benchmark’s 5-year total return percentage
Sourcepub fn five_year_vs_benchmark(&self) -> Option<f64>
pub fn five_year_vs_benchmark(&self) -> Option<f64>
Returns the stock’s outperformance vs benchmark for 5 years (positive = outperforming)
Sourcepub fn benchmark_name(&self) -> Option<&str>
pub fn benchmark_name(&self) -> Option<&str>
Returns the benchmark name
Trait Implementations§
Source§impl Clone for EquityPerformance
impl Clone for EquityPerformance
Source§fn clone(&self) -> EquityPerformance
fn clone(&self) -> EquityPerformance
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for EquityPerformance
impl Debug for EquityPerformance
Source§impl Default for EquityPerformance
impl Default for EquityPerformance
Source§fn default() -> EquityPerformance
fn default() -> EquityPerformance
Source§impl<'de> Deserialize<'de> for EquityPerformance
impl<'de> Deserialize<'de> for EquityPerformance
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 Serialize for EquityPerformance
impl Serialize for EquityPerformance
Source§impl Translatable for EquityPerformance
impl Translatable for EquityPerformance
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 Freeze for EquityPerformance
impl RefUnwindSafe for EquityPerformance
impl Send for EquityPerformance
impl Sync for EquityPerformance
impl Unpin for EquityPerformance
impl UnsafeUnpin for EquityPerformance
impl UnwindSafe for EquityPerformance
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