pub struct StudyResult {
pub symbol_info: SymbolInfo,
pub data: Vec<DataPoint>,
pub study_id: String,
pub total_points_received: usize,
pub elapsed: Duration,
}Expand description
The final result of a study data retrieval.
Fields§
§symbol_info: SymbolInfoSymbol metadata returned during symbol resolution.
data: Vec<DataPoint>Collected and deduplicated data points for the study.
study_id: StringThe unique study identifier used during retrieval.
total_points_received: usizeTotal raw study data points received before deduplication.
elapsed: DurationWall-clock duration elapsed during the retrieval.
Implementations§
Source§impl StudyResult
impl StudyResult
Sourcepub fn points_mut(&mut self) -> &mut [DataPoint]
pub fn points_mut(&mut self) -> &mut [DataPoint]
Mutable slice of the collected study data points.
Sourcepub fn into_points(self) -> Vec<DataPoint>
pub fn into_points(self) -> Vec<DataPoint>
Consumes the result and returns the inner vector of data points.
Sourcepub fn first_timestamp(&self) -> Option<i64>
pub fn first_timestamp(&self) -> Option<i64>
Timestamp of the first data point, if available.
Extracted directly from value[0] without assuming OHLCV structure.
Sourcepub fn last_timestamp(&self) -> Option<i64>
pub fn last_timestamp(&self) -> Option<i64>
Timestamp of the last data point, if available.
Extracted directly from value[0] without assuming OHLCV structure.
Sourcepub fn first_datetime(&self) -> Option<DateTime<Utc>>
pub fn first_datetime(&self) -> Option<DateTime<Utc>>
UTC DateTime of the first data point, if available.
Sourcepub fn last_datetime(&self) -> Option<DateTime<Utc>>
pub fn last_datetime(&self) -> Option<DateTime<Utc>>
UTC DateTime of the last data point, if available.
Trait Implementations§
Source§impl Clone for StudyResult
impl Clone for StudyResult
Source§impl Debug for StudyResult
impl Debug for StudyResult
Source§impl<'de> Deserialize<'de> for StudyResult
impl<'de> Deserialize<'de> for StudyResult
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
Auto Trait Implementations§
impl Freeze for StudyResult
impl RefUnwindSafe for StudyResult
impl Send for StudyResult
impl Sync for StudyResult
impl Unpin for StudyResult
impl UnsafeUnpin for StudyResult
impl UnwindSafe for StudyResult
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