pub struct DayTime {
pub day: DayReference,
pub time: Time,
}Expand description
Represents a combination of a day reference and a specific time.
Used for expressions like “tomorrow at 3:30 pm” or “next Monday at 9:00 am”.
§Examples
use temps_core::{DayTime, DayReference, Time, Meridiem};
// "tomorrow at 3:30 pm"
let tomorrow_afternoon = DayTime {
day: DayReference::Tomorrow,
time: Time {
hour: 3,
minute: 30,
second: 0,
meridiem: Some(Meridiem::PM),
},
};Fields§
§day: DayReferenceThe day reference
time: TimeThe specific time on that day
Trait Implementations§
impl Copy for DayTime
impl Eq for DayTime
impl StructuralPartialEq for DayTime
Auto Trait Implementations§
impl Freeze for DayTime
impl RefUnwindSafe for DayTime
impl Send for DayTime
impl Sync for DayTime
impl Unpin for DayTime
impl UnsafeUnpin for DayTime
impl UnwindSafe for DayTime
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