pub struct VcsState {
pub version: u32,
pub identities: Vec<Identity>,
pub sessions: Vec<Session>,
pub session_identities: BTreeMap<SessionToken, String>,
pub preserved: Vec<Recoverable>,
}Expand description
Everything the repository side of a run knows about itself.
Every field is public and serializable, so a journey both seeds a scenario and asserts on what a run left behind. Everything but the version is omitted when it holds nothing, so a hand-written document names only the part of a scenario that matters — and a document written by a build that knew fewer fields still reads here.
Fields§
§version: u32The schema version this state was written at. A document that names none is this version: it is the only one there has ever been.
identities: Vec<Identity>The repository identities this provider can resolve. A
SessionRequest::repo naming none of them is refused, the way an
unregistered repository is.
sessions: Vec<Session>Every session opened or seeded, in the order they were opened.
session_identities: BTreeMap<SessionToken, String>Which identity each session belongs to.
Beyond the sketch this crate was specified from, and unavoidable: a
Session carries no identity, and a Recoverable must name one — so
preserving a session’s branch could not answer the question recoverable
asks without this. open_session records it; nothing else writes it.
preserved: Vec<Recoverable>Preserved work, newest last, as recoverable reports it.
Recoverable rather than PreservedBranch — it contains the preserved
branch and adds the identity, the checkout, why the workstream stopped, and
the command that lands it, none of which are derivable from the branch
alone. One list rather than two that could disagree.
Trait Implementations§
Source§impl Checked for VcsState
A seeded repository side is refused if it holds a session nothing could act on.
impl Checked for VcsState
A seeded repository side is refused if it holds a session nothing could act on.
Source§impl Default for VcsState
A repository side that knows nothing, at the version this build writes.
impl Default for VcsState
A repository side that knows nothing, at the version this build writes.