pub struct SeriesIdentity {
pub symbol: String,
pub timeframe: String,
pub session: SessionKind,
pub continuity: ContinuityKind,
pub price_adjustment: PriceAdjustment,
pub provenance: Provenance,
pub contract_code: Option<String>,
}Expand description
Comprehensive, provider-neutral provenance and identity specification for a time series.
Ties together instrument symbol, timeframe, session type, contract continuity, and price adjustment. Can be attached to stored artifacts or downstream results to ensure that price-level findings (e.g. Elliott Waves, pivots, S/R zones) are never evaluated against mismatched data feeds.
Fields§
§symbol: String§timeframe: String§session: SessionKind§continuity: ContinuityKind§price_adjustment: PriceAdjustment§provenance: Provenance§contract_code: Option<String>Implementations§
Source§impl SeriesIdentity
impl SeriesIdentity
pub fn new(symbol: impl Into<String>, timeframe: impl Into<String>) -> Self
pub fn with_session(self, session: SessionKind) -> Self
pub fn with_continuity(self, continuity: ContinuityKind) -> Self
pub fn with_price_adjustment(self, adj: PriceAdjustment) -> Self
pub fn with_provenance(self, prov: Provenance) -> Self
pub fn with_contract_code(self, code: impl Into<String>) -> Self
Sourcepub fn is_compatible(&self, other: &Self) -> bool
pub fn is_compatible(&self, other: &Self) -> bool
Returns true if this series is compatible with another series in terms of symbol, session boundaries, contract continuity, and price adjustment.
Trait Implementations§
Source§impl Clone for SeriesIdentity
impl Clone for SeriesIdentity
Source§fn clone(&self) -> SeriesIdentity
fn clone(&self) -> SeriesIdentity
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SeriesIdentity
impl Debug for SeriesIdentity
Source§impl<'de> Deserialize<'de> for SeriesIdentity
impl<'de> Deserialize<'de> for SeriesIdentity
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
impl Eq for SeriesIdentity
Source§impl PartialEq for SeriesIdentity
impl PartialEq for SeriesIdentity
Source§impl Serialize for SeriesIdentity
impl Serialize for SeriesIdentity
impl StructuralPartialEq for SeriesIdentity
Auto Trait Implementations§
impl Freeze for SeriesIdentity
impl RefUnwindSafe for SeriesIdentity
impl Send for SeriesIdentity
impl Sync for SeriesIdentity
impl Unpin for SeriesIdentity
impl UnsafeUnpin for SeriesIdentity
impl UnwindSafe for SeriesIdentity
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