pub struct NewTimeEntry {
pub id: Option<String>,
pub duration_minutes: i64,
pub date: Option<String>,
pub author: String,
pub note: Option<String>,
}Expand description
A new entry to create, with the id optional.
The id is Option because tix time add has no --entry flag (contract
cli-surface.md): the service mints one through new_entry_id so the CLI,
the TUI and MCP cannot each invent their own shape. A caller that does own an
id — a portable import, a test — names it with NewTimeEntry::with_id.
Fields§
§id: Option<String>The stable id, or None for one generated when the intent is built.
duration_minutes: i64The effort, in whole minutes at or above zero.
date: Option<String>The calendar date the effort belongs to, YYYY-MM-DD, when known.
Who did the work.
note: Option<String>Optional free text.
Implementations§
Source§impl NewTimeEntry
impl NewTimeEntry
Sourcepub fn new(duration_minutes: i64, author: impl Into<String>) -> Self
pub fn new(duration_minutes: i64, author: impl Into<String>) -> Self
A new entry of duration_minutes minutes, attributed to author.
Sourcepub fn with_id(self, id: impl Into<String>) -> Self
pub fn with_id(self, id: impl Into<String>) -> Self
Create under this stable id instead of a generated one.
Trait Implementations§
Source§impl Clone for NewTimeEntry
impl Clone for NewTimeEntry
Source§impl Debug for NewTimeEntry
impl Debug for NewTimeEntry
impl Eq for NewTimeEntry
Source§impl PartialEq for NewTimeEntry
impl PartialEq for NewTimeEntry
impl StructuralPartialEq for NewTimeEntry
Auto Trait Implementations§
impl Freeze for NewTimeEntry
impl RefUnwindSafe for NewTimeEntry
impl Send for NewTimeEntry
impl Sync for NewTimeEntry
impl Unpin for NewTimeEntry
impl UnsafeUnpin for NewTimeEntry
impl UnwindSafe for NewTimeEntry
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