pub struct Plan {
pub revision: u64,
pub items: Vec<Item>,
}Expand description
A whole plan: the steps in priority order, and the revision the store is at.
The revision is what keeps two surfaces honest. The dashboard polls and the terminal takes a live frame, so both can be looking at a snapshot; a client that applied a stale one can tell, which is the sort of disagreement nobody notices until they act on it.
Fields§
§revision: u64§items: Vec<Item>Implementations§
Source§impl Plan
impl Plan
pub fn new(items: Vec<Item>) -> Self
pub fn counts(&self) -> Counts
Sourcepub fn active(&self) -> impl Iterator<Item = &Item>
pub fn active(&self) -> impl Iterator<Item = &Item>
The steps still worth showing, in order. Finished ones are left out of a handoff and out of the “what is left” count, for the reason Hermes leaves them out of its todo injection: a finished step in the handoff invites the model to do it again.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Plan
impl<'de> Deserialize<'de> for Plan
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>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Plan
impl StructuralPartialEq for Plan
Auto Trait Implementations§
impl Forget for Plan
impl Freeze for Plan
impl Move for Plan
impl RefUnwindSafe for Plan
impl Send for Planwhere
RawVecInner: Send,
impl Sync for Planwhere
RawVecInner: Sync,
impl Unpin for Plan
impl UnsafeUnpin for Plan
impl UnwindSafe for Planwhere
RawVecInner: UnwindSafe,
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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
Compare self to
key and return true if they are equal.