pub struct TimeSeriesDataPoint<TDate: Hash + Clone + Eq + Ord, T> {
pub timestamp: TDate,
pub value: T,
}
Expand description
TimeSeriesDataPoint representation, consists of a timestamp and value
Fields§
§timestamp: TDate
§value: T
Implementations§
Source§impl<TDate: Hash + Clone + Eq + Ord, T> TimeSeriesDataPoint<TDate, T>
impl<TDate: Hash + Clone + Eq + Ord, T> TimeSeriesDataPoint<TDate, T>
Sourcepub fn new(timestamp: TDate, value: T) -> TimeSeriesDataPoint<TDate, T>
pub fn new(timestamp: TDate, value: T) -> TimeSeriesDataPoint<TDate, T>
Generic new method
Source§impl<T> TimeSeriesDataPoint<NaiveDateTime, T>
impl<T> TimeSeriesDataPoint<NaiveDateTime, T>
Sourcepub fn from_int_stamp(
secs: i64,
value: T,
) -> TimeSeriesDataPoint<NaiveDateTime, T>
pub fn from_int_stamp( secs: i64, value: T, ) -> TimeSeriesDataPoint<NaiveDateTime, T>
Convenience function makes TimeSeriesDataPoints from integer stamps
Trait Implementations§
Source§impl<TDate: Clone + Hash + Clone + Eq + Ord, T: Clone> Clone for TimeSeriesDataPoint<TDate, T>
impl<TDate: Clone + Hash + Clone + Eq + Ord, T: Clone> Clone for TimeSeriesDataPoint<TDate, T>
Source§fn clone(&self) -> TimeSeriesDataPoint<TDate, T>
fn clone(&self) -> TimeSeriesDataPoint<TDate, T>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<TDate: Debug + Hash + Clone + Eq + Ord, T: Debug> Debug for TimeSeriesDataPoint<TDate, T>
impl<TDate: Debug + Hash + Clone + Eq + Ord, T: Debug> Debug for TimeSeriesDataPoint<TDate, T>
Source§impl<'de, TDate, T> Deserialize<'de> for TimeSeriesDataPoint<TDate, T>
impl<'de, TDate, T> Deserialize<'de> for TimeSeriesDataPoint<TDate, T>
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
Source§impl<TDate: Serialize + Hash + Clone + Eq + Ord, T: Clone> FromIterator<TimeSeriesDataPoint<TDate, T>> for TimeSeries<TDate, T>
impl<TDate: Serialize + Hash + Clone + Eq + Ord, T: Clone> FromIterator<TimeSeriesDataPoint<TDate, T>> for TimeSeries<TDate, T>
Source§fn from_iter<Tin>(iter: Tin) -> Selfwhere
Tin: IntoIterator<Item = TimeSeriesDataPoint<TDate, T>>,
fn from_iter<Tin>(iter: Tin) -> Selfwhere
Tin: IntoIterator<Item = TimeSeriesDataPoint<TDate, T>>,
Creates a value from an iterator. Read more
Auto Trait Implementations§
impl<TDate, T> Freeze for TimeSeriesDataPoint<TDate, T>
impl<TDate, T> RefUnwindSafe for TimeSeriesDataPoint<TDate, T>where
TDate: RefUnwindSafe,
T: RefUnwindSafe,
impl<TDate, T> Send for TimeSeriesDataPoint<TDate, T>
impl<TDate, T> Sync for TimeSeriesDataPoint<TDate, T>
impl<TDate, T> Unpin for TimeSeriesDataPoint<TDate, T>
impl<TDate, T> UnwindSafe for TimeSeriesDataPoint<TDate, T>where
TDate: UnwindSafe,
T: UnwindSafe,
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