pub struct WorkDay {
pub clock_in: DateTime<Local>,
pub break_start: DateTime<Local>,
pub break_end: DateTime<Local>,
pub clock_out: DateTime<Local>,
}Expand description
A day to get work done.
Fields§
§clock_in: DateTime<Local>The date and time to clock in
break_start: DateTime<Local>The date and time to take a break
break_end: DateTime<Local>The date and time to end the break
clock_out: DateTime<Local>The date and time to stop working
Implementations§
Source§impl WorkDay
impl WorkDay
Sourcepub fn randomize_shift(
start: DateTime<Local>,
duration: Duration,
max_rand_range: u16,
) -> Self
pub fn randomize_shift( start: DateTime<Local>, duration: Duration, max_rand_range: u16, ) -> Self
Get a WorkDay with times for clock in, break start, break end and clock out. Apply a random offset to the starting time and to the break time while still keeping the break and work duratinos exact.
Sourcepub fn standard_shift(start: DateTime<Local>, duration: Duration) -> Self
pub fn standard_shift(start: DateTime<Local>, duration: Duration) -> Self
Get a WorkDay with times for clock in, break start, break end and clock out.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for WorkDay
impl RefUnwindSafe for WorkDay
impl Send for WorkDay
impl Sync for WorkDay
impl Unpin for WorkDay
impl UnwindSafe for WorkDay
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