pub struct EpsRevisions {
pub historical: Vec<RevisionPoint>,
}Expand description
EPS revisions tracking upward and downward changes.
This struct now uses a flexible collection of revision points instead of hardcoded time buckets, making it provider-agnostic.
Fields§
§historical: Vec<RevisionPoint>Historical EPS revision data points with flexible time periods. Each provider can populate this with their available time periods (e.g., a generic provider might use “7d”, “30d” while another provider might use “1mo”, “3mo”, “6mo”).
Implementations§
Source§impl EpsRevisions
impl EpsRevisions
Sourcepub const fn new(historical: Vec<RevisionPoint>) -> Self
pub const fn new(historical: Vec<RevisionPoint>) -> Self
Creates a new EPS revisions struct with the specified historical data.
Sourcepub fn find_by_period(&self, period: &str) -> Option<&RevisionPoint>
pub fn find_by_period(&self, period: &str) -> Option<&RevisionPoint>
Finds a revision point by period string.
Sourcepub fn available_periods(&self) -> Vec<&str>
pub fn available_periods(&self) -> Vec<&str>
Returns all available periods in the historical data.
Sourcepub fn total_up_revisions(&self) -> u32
pub fn total_up_revisions(&self) -> u32
Returns the total number of upward revisions across all periods.
Sourcepub fn total_down_revisions(&self) -> u32
pub fn total_down_revisions(&self) -> u32
Returns the total number of downward revisions across all periods.
Sourcepub fn net_revisions(&self) -> i32
pub fn net_revisions(&self) -> i32
Returns the net revision count across all periods (total up - total down).
Trait Implementations§
Source§impl Clone for EpsRevisions
impl Clone for EpsRevisions
Source§fn clone(&self) -> EpsRevisions
fn clone(&self) -> EpsRevisions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more