pub enum ForceStatus {
Live(DateTime<Utc>),
Lapsed(DateTime<Utc>),
Unreadable,
}Expand description
What a ProjectBinding::forced_until currently says about its force.
Lives here, beside the field it interprets, because both readers of that
field are in commands:: and this module depends on neither — so one
place knows the stored format and both can reach it with no cycle.
There used to be two readers and no shared type:
commands::stream::attribution_mode folded the question into a bool while
commands::project::format_force_line did its own RFC3339 parse and
Utc::now() comparison to choose between its active / lapsed / unreadable
wordings — and a test existed purely to pin that the two independently
written predicates agreed on the unparseable case, which is itself the
evidence they could have drifted. That test now pins one implementation
rather than reconciling two.
Variants§
Live(DateTime<Utc>)
Parsed, and still in the future: the force applies.
Lapsed(DateTime<Utc>)
Parsed, but already past — the FORCE lapsed; the binding survives.
Unreadable
Not RFC3339 at all (a hand-edited or corrupted state file).
Trait Implementations§
Source§impl Clone for ForceStatus
impl Clone for ForceStatus
Source§impl Debug for ForceStatus
impl Debug for ForceStatus
impl Eq for ForceStatus
Source§impl PartialEq for ForceStatus
impl PartialEq for ForceStatus
impl StructuralPartialEq for ForceStatus
Auto Trait Implementations§
impl Forget for ForceStatus
impl Freeze for ForceStatus
impl Move for ForceStatus
impl RefUnwindSafe for ForceStatus
impl Send for ForceStatus
impl Sync for ForceStatus
impl Unpin for ForceStatus
impl UnsafeUnpin for ForceStatus
impl UnwindSafe for ForceStatus
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§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.