pub struct WorkingHours {
pub start: Time,
pub end: Time,
pub active_days: Vec<Weekday>,
pub lower_bound: Option<OffsetDateTime>,
pub upper_bound: Option<OffsetDateTime>,
}
Fields§
§start: Time
§end: Time
§active_days: Vec<Weekday>
§lower_bound: Option<OffsetDateTime>
§upper_bound: Option<OffsetDateTime>
Implementations§
Source§impl WorkingHours
impl WorkingHours
pub fn is_active(&self) -> bool
pub fn active_during_ts(&self, time: OffsetDateTime) -> bool
pub fn active_during_day(&self, day: Weekday) -> bool
pub fn working_time_in_range(&self, range: TimeRange) -> Vec<TimeRange>
Trait Implementations§
Source§impl Clone for WorkingHours
impl Clone for WorkingHours
Source§fn clone(&self) -> WorkingHours
fn clone(&self) -> WorkingHours
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 moreAuto Trait Implementations§
impl Freeze for WorkingHours
impl RefUnwindSafe for WorkingHours
impl Send for WorkingHours
impl Sync for WorkingHours
impl Unpin for WorkingHours
impl UnwindSafe for WorkingHours
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