pub struct PortableTimeEntry {
pub id: String,
pub duration_minutes: Option<i64>,
pub date: Option<String>,
pub author: Option<String>,
pub note: Option<String>,
pub minutes: Option<i64>,
pub valid: bool,
pub diagnostics: Vec<PortableTimeDiagnostic>,
pub extensions: PortableExtensions,
/* private fields */
}Expand description
One current entry, projected field for field (T034).
The values are the entry’s own and nothing is smoothed over: an entry the file holds
with a missing or negative duration_minutes keeps that value here (a diagnostic on
the row says which problem it is), minutes is the shared
TimeEntry::minutes answer — None exactly when the duration is unusable, so no
reader can mistake a malformed entry for a zero-minute one — and valid is the
shared TimeEntry::is_valid. extensions and unknown are the two preservation
channels the module docs describe: the entry’s unknown metadata lives in the nested
object, so a key named minutes or author cannot shadow the real one, and the
flattened catch-all is read-only, so no caller can put one there.
Fields§
§id: StringThe stable id: identity for edits, deletions and History references, verbatim.
duration_minutes: Option<i64>The duration the file states, verbatim; null when the entry states none.
date: Option<String>The calendar date the effort belongs to, verbatim; null when it carries none.
Who recorded the effort, verbatim; null when the entry names no attribution.
A blank author (author: "", or the key omitted) is unanswerable, not an empty
name: the file states no identity, so null is the honest rendering — the same
statement every other absent field in this row makes — and valid: false with the
shared missing_author finding beside it says why. The reader accepts null and an
omitted key as well as a string, so a document that says either re-reads.
note: Option<String>Optional free text, verbatim; null when the entry carries none.
minutes: Option<i64>The duration when it is usable (TimeEntry::minutes): null exactly when the
stated duration is absent or negative, never 0.
valid: boolWhether the entry has no field-level problem (TimeEntry::is_valid).
diagnostics: Vec<PortableTimeDiagnostic>Every field-level problem, through the shared entry-to-diagnostic mapping.
extensions: PortableExtensionsThe entry’s unknown metadata, preserved verbatim in a namespace of its own.
Implementations§
Source§impl PortableTimeEntry
impl PortableTimeEntry
Sourcepub fn unknown(&self) -> &PortableExtensions
pub fn unknown(&self) -> &PortableExtensions
The keys a newer writer placed directly on this entry row, preserved verbatim.
The read side of the entry’s catch-all channel; there is no write side, by design (see the field).
Trait Implementations§
Source§impl Clone for PortableTimeEntry
impl Clone for PortableTimeEntry
Source§impl Debug for PortableTimeEntry
impl Debug for PortableTimeEntry
Source§impl<'de> Deserialize<'de> for PortableTimeEntry
impl<'de> Deserialize<'de> for PortableTimeEntry
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>,
Source§impl PartialEq for PortableTimeEntry
impl PartialEq for PortableTimeEntry
Source§impl Serialize for PortableTimeEntry
impl Serialize for PortableTimeEntry
impl StructuralPartialEq for PortableTimeEntry
Auto Trait Implementations§
impl Freeze for PortableTimeEntry
impl RefUnwindSafe for PortableTimeEntry
impl Send for PortableTimeEntry
impl Sync for PortableTimeEntry
impl Unpin for PortableTimeEntry
impl UnsafeUnpin for PortableTimeEntry
impl UnwindSafe for PortableTimeEntry
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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> ⓘ
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> ⓘ
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