pub struct TimeEntryEdit {
pub duration_minutes: Patch<i64>,
pub date: Patch<String>,
pub author: Patch<String>,
pub note: Patch<String>,
}Expand description
The fields of an entry edit: each left alone unless it is named (T008).
A patch rather than a replacement entry, because tix time edit … --minutes 30
names one field and must not silently drop the entry’s date, note or preserved
unknown metadata. The merge is apply_to, so the CLI, the TUI and MCP
share one definition of “what an edit means” instead of three.
Fields§
§duration_minutes: Patch<i64>The replacement duration, in whole minutes.
date: Patch<String>The replacement date, or Clear for none.
The replacement author. Clear is refused: an entry without attribution is
not auditable.
note: Patch<String>The replacement note, or Clear for none.
Implementations§
Source§impl TimeEntryEdit
impl TimeEntryEdit
Sourcepub fn clear_date(self) -> Self
pub fn clear_date(self) -> Self
Remove the date.
Replace the author.
Sourcepub fn clear_note(self) -> Self
pub fn clear_note(self) -> Self
Remove the note.
Trait Implementations§
Source§impl Clone for TimeEntryEdit
impl Clone for TimeEntryEdit
Source§impl Debug for TimeEntryEdit
impl Debug for TimeEntryEdit
Source§impl Default for TimeEntryEdit
impl Default for TimeEntryEdit
impl Eq for TimeEntryEdit
Source§impl PartialEq for TimeEntryEdit
impl PartialEq for TimeEntryEdit
impl StructuralPartialEq for TimeEntryEdit
Auto Trait Implementations§
impl Freeze for TimeEntryEdit
impl RefUnwindSafe for TimeEntryEdit
impl Send for TimeEntryEdit
impl Sync for TimeEntryEdit
impl Unpin for TimeEntryEdit
impl UnsafeUnpin for TimeEntryEdit
impl UnwindSafe for TimeEntryEdit
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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