pub struct TimeInterval {
pub start: OffsetDateTime,
pub end: OffsetDateTime,
}Expand description
An ISO 8601 UTC time interval in the BDEW minute-precision format.
Format: yyyy-mm-ddThh:mmZ/yyyy-mm-ddThh:mmZ
Fields§
§start: OffsetDateTimeStart of the interval (inclusive), always UTC.
end: OffsetDateTimeEnd of the interval (exclusive), always UTC.
Implementations§
Source§impl TimeInterval
impl TimeInterval
Sourcepub fn new(
start: OffsetDateTime,
end: OffsetDateTime,
) -> Result<Self, RedispatchXmlError>
pub fn new( start: OffsetDateTime, end: OffsetDateTime, ) -> Result<Self, RedispatchXmlError>
Create a new interval, validating that both timestamps are UTC and that start precedes end.
Trait Implementations§
Source§impl Clone for TimeInterval
impl Clone for TimeInterval
Source§fn clone(&self) -> TimeInterval
fn clone(&self) -> TimeInterval
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 TimeInterval
impl Debug for TimeInterval
Source§impl<'de> Deserialize<'de> for TimeInterval
impl<'de> Deserialize<'de> for TimeInterval
Source§fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for TimeInterval
impl Display for TimeInterval
impl Eq for TimeInterval
Source§impl PartialEq for TimeInterval
impl PartialEq for TimeInterval
Source§fn eq(&self, other: &TimeInterval) -> bool
fn eq(&self, other: &TimeInterval) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for TimeInterval
impl Serialize for TimeInterval
impl StructuralPartialEq for TimeInterval
Auto Trait Implementations§
impl Freeze for TimeInterval
impl RefUnwindSafe for TimeInterval
impl Send for TimeInterval
impl Sync for TimeInterval
impl Unpin for TimeInterval
impl UnsafeUnpin for TimeInterval
impl UnwindSafe for TimeInterval
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