pub struct SpendRecord {
pub session: Spend,
pub goal: Option<GoalSpendRecord>,
}Expand description
What a session has spent since it was created, and its goal since it was set, as the session log records them.
Fields§
§session: Spend§goal: Option<GoalSpendRecord>Implementations§
Source§impl SpendRecord
impl SpendRecord
Sourcepub fn latest(
records: impl IntoIterator<Item = SpendRecord>,
) -> Option<SpendRecord>
pub fn latest( records: impl IntoIterator<Item = SpendRecord>, ) -> Option<SpendRecord>
The latest of records, a session log’s in order. Two writers record
them — the engine and the session pool — and what was spent only
grows, so each figure is the largest recorded, whichever landed last;
a goal’s, the largest recorded under its id.
Trait Implementations§
Source§impl Clone for SpendRecord
impl Clone for SpendRecord
Source§impl Debug for SpendRecord
impl Debug for SpendRecord
Source§impl Default for SpendRecord
impl Default for SpendRecord
Source§impl<'de> Deserialize<'de> for SpendRecord
impl<'de> Deserialize<'de> for SpendRecord
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
impl Eq for SpendRecord
Source§impl PartialEq for SpendRecord
impl PartialEq for SpendRecord
Source§impl Serialize for SpendRecord
impl Serialize for SpendRecord
impl StructuralPartialEq for SpendRecord
Auto Trait Implementations§
impl Forget for SpendRecord
impl Freeze for SpendRecord
impl Move for SpendRecord
impl RefUnwindSafe for SpendRecord
impl Send for SpendRecord
impl Sync for SpendRecord
impl Unpin for SpendRecord
impl UnsafeUnpin for SpendRecord
impl UnwindSafe for SpendRecord
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