Enum vrp_core::models::common::TimeSpan [−][src]
pub enum TimeSpan {
Window(TimeWindow),
Offset(TimeOffset),
}A enum for various time definitions.
Variants
Window(TimeWindow)A time window variant.
Offset(TimeOffset)A time offset variant.
Implementations
impl TimeSpan[src]
impl TimeSpan[src]pub fn to_time_window(&self, date: Timestamp) -> TimeWindow[src]
Converts given time span into time window.
pub fn intersects(&self, date: Timestamp, other: &TimeWindow) -> bool[src]
Checks that this time span intersects with given time windows.
pub fn as_time_window(&self) -> Option<TimeWindow>[src]
If time span is time window, then return it. Otherwise, return None.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TimeSpan
impl RefUnwindSafe for TimeSpanimpl UnwindSafe for TimeSpan
impl UnwindSafe for TimeSpan