pub struct PeriodSpan<'a> {
pub start: DateTime,
pub end: DateTime,
pub period: &'a ChargingPeriod,
}Available on crate feature
v2_3_0 only.Expand description
A ChargingPeriod together with the interval it covers.
Produced by Cdr::period_spans, which is where the boundary rule is explained.
Fields§
§start: DateTimeThe period’s own start_date_time.
end: DateTimeThe next period’s start, or the CDR’s end_date_time for the last one.
period: &'a ChargingPeriodThe period itself.
Implementations§
Source§impl PeriodSpan<'_>
impl PeriodSpan<'_>
Sourcepub fn volume(&self, dimension: CdrDimensionType) -> Option<Number>
pub fn volume(&self, dimension: CdrDimensionType) -> Option<Number>
The volume recorded for one dimension in this period.
Sourcepub fn duration_seconds(&self) -> i64
pub fn duration_seconds(&self) -> i64
How long the interval is, in seconds. Negative if the CDR’s periods are out of order.
Trait Implementations§
Source§impl<'a> Clone for PeriodSpan<'a>
impl<'a> Clone for PeriodSpan<'a>
Source§fn clone(&self) -> PeriodSpan<'a>
fn clone(&self) -> PeriodSpan<'a>
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 moreimpl<'a> Copy for PeriodSpan<'a>
Source§impl<'a> Debug for PeriodSpan<'a>
impl<'a> Debug for PeriodSpan<'a>
Source§impl<'a> PartialEq for PeriodSpan<'a>
impl<'a> PartialEq for PeriodSpan<'a>
impl<'a> StructuralPartialEq for PeriodSpan<'a>
Auto Trait Implementations§
impl<'a> Freeze for PeriodSpan<'a>
impl<'a> RefUnwindSafe for PeriodSpan<'a>
impl<'a> Send for PeriodSpan<'a>
impl<'a> Sync for PeriodSpan<'a>
impl<'a> Unpin for PeriodSpan<'a>
impl<'a> UnsafeUnpin for PeriodSpan<'a>
impl<'a> UnwindSafe for PeriodSpan<'a>
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