1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//! Type states for a [`CmdContext`].
//!
//! These distinguish how a `CmdContext` is prepared for use.
//!
//! [`CmdContext`]: crate::workspace::CmdContext
use ;
// # Idea
//
// /// Marks a workspace with no `.peace` directory, so no parameters or metadata
// /// are persisted.
// ///
// /// All state information (current, desired, diff) must be discovered within a
// /// command execution.
// ///
// /// * Does not write parameters or metadata to disk -- command executions cannot
// /// reason off previous executions.
// /// * Limits usability in terms of parameters, and caching current and desired
// /// states.
// #[derive(Clone, Copy, Debug, Deserialize, Serialize)]
// pub struct WithoutPeaceDir;
/// CmdContext with no profile selected.
///
/// This is used when a command is run using a shared workspace profile and flow.
///
/// # Examples
///
/// * Downloading a repository or project, used to deploy different profile environments.
/// * Storing preferences for a user.
;
/// CmdContext with a profile selected.
///
/// This is used when a command is run for a particular profile, and the
/// information is either not applicable to any flow, or is shared across flows.
///
/// # Examples
///
/// * Storing information for a profile.
;
/// CmdContext with profile selection deferred.
///
/// This is used when the profile is evaluated at the point of command context
/// building, for example when the profile is read from workflow params.
;
/// CmdContext with a flow selected.
///
/// This is used when a command is run for a particular flow.
///
/// # Examples
///
/// * An environment deployment workflow.
/// * A configuration management workflow.
;