pub enum EntryTime<'a> {
Recorded(&'a str),
Unknown,
}Expand description
The entry timestamp to compute queue age from, with its one documented fallback (T003, FR-005).
Research R4 rejects created (it predates the queue) and updated (it moves
on every edit) as age proxies, so an issue that recorded no entry time has an
unknown age — and this enum says so rather than substituting a date that
measures something else (data-model §2: “must not silently invent an exact
age”).
The shape is the point. Returning None from an Option<&str> would let a
caller unwrap_or a borrowed updated without appearing to make a decision;
EntryTime::Unknown has to be matched before any number can be produced, so
the fallback is written down at every call site or the code does not compile.
Variants§
Recorded(&'a str)
The issue’s entered_at, verbatim.
Unknown
The issue has no entered_at. Report the age as unknown.
Trait Implementations§
impl<'a> Copy for EntryTime<'a>
impl<'a> Eq for EntryTime<'a>
impl<'a> StructuralPartialEq for EntryTime<'a>
Auto Trait Implementations§
impl<'a> Freeze for EntryTime<'a>
impl<'a> RefUnwindSafe for EntryTime<'a>
impl<'a> Send for EntryTime<'a>
impl<'a> Sync for EntryTime<'a>
impl<'a> Unpin for EntryTime<'a>
impl<'a> UnsafeUnpin for EntryTime<'a>
impl<'a> UnwindSafe for EntryTime<'a>
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,
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
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> ⓘ
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