pub struct TimeSeries {
pub start: DateTime<Utc>,
pub end: DateTime<Utc>,
pub timedelta: Option<Duration>,
}Expand description
Container for time series information. This allows functions to use less parameters.
§Arguments
start- Specify date and time for the start of the time series.end- Specify date and time for the end of the time series.timedelta- Optionally used to specify the time step of the time series.
§Examples
use meteomatics::TimeSeries;
use chrono::{DateTime, Duration, Utc, TimeZone};
let dt_start = Utc::now();
let time_series = TimeSeries {
start: dt_start,
end: dt_start + Duration::days(1),
timedelta: Option::from(Duration::hours(3))
};
println!("Time series: {}", time_series);Fields§
§start: DateTime<Utc>§end: DateTime<Utc>§timedelta: Option<Duration>Trait Implementations§
Source§impl Debug for TimeSeries
impl Debug for TimeSeries
Auto Trait Implementations§
impl Freeze for TimeSeries
impl RefUnwindSafe for TimeSeries
impl Send for TimeSeries
impl Sync for TimeSeries
impl Unpin for TimeSeries
impl UnwindSafe for TimeSeries
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
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>
Converts
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>
Converts
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