pub struct Recoverable {
pub identity: String,
pub branch: PreservedBranch,
pub checkout: PathBuf,
pub stopped_because: String,
pub landed: Landed,
pub recover_command: Vec<String>,
pub held_by: Option<HeldBy>,
pub net_negative: Option<NetNegative>,
pub session: Option<SessionToken>,
pub labels: BTreeMap<String, String>,
pub on_origin: Option<OnOrigin>,
pub retirement: Option<Retirement>,
}Expand description
Preserved work, whether it reached its base, and what would land it.
Read through the conversion below, which is where the one thing this row could contradict itself about is settled: a row saying the work reached the base and carrying the argv that publishes it again does not deserialize at all. The row is read to be pasted, and the whole reason the answer is on it is that pasting one for finished work re-opens a change request for what the base has.
Fields§
§identity: StringThe identity the work belongs to.
branch: PreservedBranchThe branch and why it was preserved.
checkout: PathBufThe checkout the branch can be reached from.
stopped_because: StringWhy the workstream stopped.
landed: LandedWhether the work reached the base, and what says so.
The one field on this row that decides whether the row is an instruction at all: a row whose work reached the base carries no argv.
Written always and defaulted on the way in, so a stored document that predates the field reads back as the answer it gave: nothing said.
recover_command: Vec<String>The argv that lands it, ready to run.
Ready to run is a claim about the branch as much as about the argv, so it holds only where the two fields below say nothing: work a live session is still writing to has not stopped, and running this on it publishes a branch mid-flight.
Empty where nothing may be run, which is every row whose work reached the base: the argv would publish work that is already there. A row is read to be pasted, so the answer is the absence of a command rather than a command with a warning beside it.
held_by: Option<HeldBy>The live session still writing to this branch, when one is.
Present at all is the answer: this is not preserved work yet, and
recover_command must not be run until that session
is done with it. Absent — every row of a report about work that really did
stop — and the row is exactly what it has always been.
net_negative: Option<NetNegative>What the branch would land, when it removes more lines than it adds.
A branch that deletes far more than it adds may be perfectly correct, and it
is not something to publish unread — so it is marked rather than excluded,
and marked only then: a branch that adds at least as much as it removes
carries nothing here, and cannot, because NetNegative holds no such count.
session: Option<SessionToken>The session that answers for this branch: the newest record naming it — the
end of its chain of retries, an open one preferred — or None where no record
on this host names the branch at all, which is what a worktree-agent-*
orphan left behind by nothing this crate opened reads as.
Written always, null included, so a reader routing on it meets the key on
every row.
labels: BTreeMap<String, String>That session’s labels: what the caller that opened it said about who opened
it. An empty object where the record carries none, and where
session is None.
on_origin: Option<OnOrigin>Where onevcs preserve put this branch on its identity’s origin, when it has.
Additive, and absent for a branch nothing has preserved — which is every row
of a report a consumer that predates the field reads. It changes nothing about
recover_command: being on the origin under its own
name is not being published, and the verb that lands the work is the verb that
landed it before. That is the whole point of the verb being called preserve.
retirement: Option<Retirement>What the branch is for the question of whether it may be deleted — the
classification onevcs retire and onevcs reclaim act on, made here from this
host’s records and local refs alone, since this report never asks the host.
Additive: every row onevcs answers carries it, and a row an implementation
that does not classify answered omits it, as a consumer that predates the field
never meets it. A row whose class is retirable is not in the default report,
as a row whose work landed is not.
Trait Implementations§
Source§impl Clone for Recoverable
impl Clone for Recoverable
Source§impl Debug for Recoverable
impl Debug for Recoverable
Source§impl<'de> Deserialize<'de> for Recoverable
impl<'de> Deserialize<'de> for Recoverable
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>,
impl Eq for Recoverable
Source§impl PartialEq for Recoverable
impl PartialEq for Recoverable
Source§impl Serialize for Recoverable
impl Serialize for Recoverable
impl StructuralPartialEq for Recoverable
Auto Trait Implementations§
impl Freeze for Recoverable
impl RefUnwindSafe for Recoverable
impl Send for Recoverable
impl Sync for Recoverable
impl Unpin for Recoverable
impl UnsafeUnpin for Recoverable
impl UnwindSafe for Recoverable
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.