pub struct DayData {
pub date: Date,
pub last_id: u32,
pub work_records: HashMap<u32, WorkRecord>,
}Fields§
§date: Date§last_id: u32§work_records: HashMap<u32, WorkRecord>Implementations§
Source§impl DayData
impl DayData
pub fn new(date: Date) -> Self
pub fn add_record(&mut self, record: WorkRecord)
pub fn remove_record(&mut self, id: u32) -> Option<WorkRecord>
pub fn next_id(&mut self) -> u32
pub fn get_sorted_records(&self) -> Vec<&WorkRecord>
pub fn get_grouped_totals(&self) -> Vec<(String, u32)>
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DayData
impl<'de> Deserialize<'de> for DayData
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DayData
impl RefUnwindSafe for DayData
impl Send for DayData
impl Sync for DayData
impl Unpin for DayData
impl UnsafeUnpin for DayData
impl UnwindSafe for DayData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more