pub struct SingleProfileSingleFlow<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,{ /* private fields */ }Expand description
A command that works with one profile and one flow.
path/to/repo/.peace/envman
|- 📝 workspace_params.yaml # ✅ can read or write `WorkspaceParams`
|
|- 🌏 internal_dev_a
| |- 📝 profile_params.yaml # ✅ can read or write `ProfileParams`
| |
| |- 🌊 deploy # ✅ can read `FlowId`
| | |- 📝 flow_params.yaml # ✅ can read or write `FlowParams`
| | |- 📋 states_goal.yaml # ✅ can read or write `StatesGoal`
| | |- 📋 states_current.yaml # ✅ can read or write `StatesCurrentStored`
| |
| |- 🌊 .. # ❌ cannot read or write other `Flow` information
|
|- 🌏 .. # ❌ cannot read or write other `Profile` information§Capabilities
This kind of command can:
- Read or write workspace parameters.
- Read or write a single profile’s parameters. For multiple profiles, see
MultiProfileNoFlow.
This kind of command cannot:
- Read or write flow parameters – see
MultiProfileNoFlow. - Read or write flow state – see
SingleProfileSingleFloworMultiProfileSingleFlow.
Implementations§
Source§impl<CmdCtxTypesT> SingleProfileSingleFlow<'_, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,
impl<CmdCtxTypesT> SingleProfileSingleFlow<'_, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,
Sourcepub fn view(&mut self) -> SingleProfileSingleFlowView<'_, CmdCtxTypesT>
pub fn view(&mut self) -> SingleProfileSingleFlowView<'_, CmdCtxTypesT>
Returns a view struct of this scope.
This allows the flow and resources to be borrowed concurrently.
Sourcepub fn view_and_output(
&mut self,
) -> SingleProfileSingleFlowViewAndOutput<'_, CmdCtxTypesT>
pub fn view_and_output( &mut self, ) -> SingleProfileSingleFlowViewAndOutput<'_, CmdCtxTypesT>
Returns a view and output struct of this scope.
This allows the flow and resources to be borrowed concurrently.
Sourcepub fn output_mut(&mut self) -> &mut CmdCtxTypesT::Output
pub fn output_mut(&mut self) -> &mut CmdCtxTypesT::Output
Returns a mutable reference to the output.
Sourcepub fn interruptibility_state(&mut self) -> InterruptibilityState<'_, '_>
pub fn interruptibility_state(&mut self) -> InterruptibilityState<'_, '_>
Returns the interruptibility capability.
Sourcepub fn workspace_dir(&self) -> &WorkspaceDir
pub fn workspace_dir(&self) -> &WorkspaceDir
Returns a reference to the workspace directory.
Sourcepub fn peace_app_dir(&self) -> &PeaceAppDir
pub fn peace_app_dir(&self) -> &PeaceAppDir
Returns a reference to the .peace/$app directory.
Sourcepub fn profile_dir(&self) -> &ProfileDir
pub fn profile_dir(&self) -> &ProfileDir
Returns a reference to the profile directory.
Sourcepub fn profile_history_dir(&self) -> &ProfileHistoryDir
pub fn profile_history_dir(&self) -> &ProfileHistoryDir
Returns a reference to the profile history directory.
Sourcepub fn params_type_regs(&self) -> &ParamsTypeRegs<CmdCtxTypesT::ParamsKeys>
pub fn params_type_regs(&self) -> &ParamsTypeRegs<CmdCtxTypesT::ParamsKeys>
Returns the type registries for WorkspaceParams, ProfileParams,
and FlowParams deserialization.
Sourcepub fn params_specs_type_reg(&self) -> &ParamsSpecsTypeReg
pub fn params_specs_type_reg(&self) -> &ParamsSpecsTypeReg
Returns the type registry for each item’s Params::Spec.
This is used to deserialize ParamsSpecsFile.
Sourcepub fn params_specs(&self) -> &ParamsSpecs
pub fn params_specs(&self) -> &ParamsSpecs
Returns the item params specs for the selected flow.
Sourcepub fn states_type_reg(&self) -> &StatesTypeReg
pub fn states_type_reg(&self) -> &StatesTypeReg
Returns the type registry for each item’s State.
This is used to deserialize StatesCurrentFile and
StatesGoalFile.
Sourcepub fn resources(&self) -> &Resources<SetUp>
pub fn resources(&self) -> &Resources<SetUp>
Returns a reference to the Resources for flow execution.
Sourcepub fn resources_mut(&mut self) -> &mut Resources<SetUp>
pub fn resources_mut(&mut self) -> &mut Resources<SetUp>
Returns a reference to the Resources for flow execution.
Source§impl<CmdCtxTypesT, WorkspaceParamsK, ProfileParamsKMaybe, FlowParamsKMaybe> SingleProfileSingleFlow<'_, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes<ParamsKeys = ParamsKeysImpl<KeyKnown<WorkspaceParamsK>, ProfileParamsKMaybe, FlowParamsKMaybe>>,
WorkspaceParamsK: Clone + Debug + Eq + Hash + DeserializeOwned + Serialize + Send + Sync + Unpin + 'static,
ProfileParamsKMaybe: KeyMaybe,
FlowParamsKMaybe: KeyMaybe,
impl<CmdCtxTypesT, WorkspaceParamsK, ProfileParamsKMaybe, FlowParamsKMaybe> SingleProfileSingleFlow<'_, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes<ParamsKeys = ParamsKeysImpl<KeyKnown<WorkspaceParamsK>, ProfileParamsKMaybe, FlowParamsKMaybe>>,
WorkspaceParamsK: Clone + Debug + Eq + Hash + DeserializeOwned + Serialize + Send + Sync + Unpin + 'static,
ProfileParamsKMaybe: KeyMaybe,
FlowParamsKMaybe: KeyMaybe,
Sourcepub fn workspace_params(&self) -> &WorkspaceParams<WorkspaceParamsK>
pub fn workspace_params(&self) -> &WorkspaceParams<WorkspaceParamsK>
Returns the workspace params.
Source§impl<CmdCtxTypesT, WorkspaceParamsKMaybe, ProfileParamsK, FlowParamsKMaybe> SingleProfileSingleFlow<'_, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes<ParamsKeys = ParamsKeysImpl<WorkspaceParamsKMaybe, KeyKnown<ProfileParamsK>, FlowParamsKMaybe>>,
WorkspaceParamsKMaybe: KeyMaybe,
ProfileParamsK: Clone + Debug + Eq + Hash + DeserializeOwned + Serialize + Send + Sync + Unpin + 'static,
FlowParamsKMaybe: KeyMaybe,
impl<CmdCtxTypesT, WorkspaceParamsKMaybe, ProfileParamsK, FlowParamsKMaybe> SingleProfileSingleFlow<'_, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes<ParamsKeys = ParamsKeysImpl<WorkspaceParamsKMaybe, KeyKnown<ProfileParamsK>, FlowParamsKMaybe>>,
WorkspaceParamsKMaybe: KeyMaybe,
ProfileParamsK: Clone + Debug + Eq + Hash + DeserializeOwned + Serialize + Send + Sync + Unpin + 'static,
FlowParamsKMaybe: KeyMaybe,
Sourcepub fn profile_params(&self) -> &ProfileParams<ProfileParamsK>
pub fn profile_params(&self) -> &ProfileParams<ProfileParamsK>
Returns the profile params.
Source§impl<CmdCtxTypesT, WorkspaceParamsKMaybe, ProfileParamsKMaybe, FlowParamsK> SingleProfileSingleFlow<'_, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes<ParamsKeys = ParamsKeysImpl<WorkspaceParamsKMaybe, ProfileParamsKMaybe, KeyKnown<FlowParamsK>>>,
WorkspaceParamsKMaybe: KeyMaybe,
ProfileParamsKMaybe: KeyMaybe,
FlowParamsK: Clone + Debug + Eq + Hash + DeserializeOwned + Serialize + Send + Sync + Unpin + 'static,
impl<CmdCtxTypesT, WorkspaceParamsKMaybe, ProfileParamsKMaybe, FlowParamsK> SingleProfileSingleFlow<'_, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes<ParamsKeys = ParamsKeysImpl<WorkspaceParamsKMaybe, ProfileParamsKMaybe, KeyKnown<FlowParamsK>>>,
WorkspaceParamsKMaybe: KeyMaybe,
ProfileParamsKMaybe: KeyMaybe,
FlowParamsK: Clone + Debug + Eq + Hash + DeserializeOwned + Serialize + Send + Sync + Unpin + 'static,
Sourcepub fn flow_params(&self) -> &FlowParams<FlowParamsK>
pub fn flow_params(&self) -> &FlowParams<FlowParamsK>
Returns the flow params.
Trait Implementations§
Source§impl<'ctx, CmdCtxTypesT> Debug for SingleProfileSingleFlow<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes + Debug,
CmdCtxTypesT::Output: Debug,
CmdCtxTypesT::AppError: Debug,
CmdCtxTypesT::ParamsKeys: Debug,
impl<'ctx, CmdCtxTypesT> Debug for SingleProfileSingleFlow<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes + Debug,
CmdCtxTypesT::Output: Debug,
CmdCtxTypesT::AppError: Debug,
CmdCtxTypesT::ParamsKeys: Debug,
Auto Trait Implementations§
impl<'ctx, CmdCtxTypesT> Freeze for SingleProfileSingleFlow<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !RefUnwindSafe for SingleProfileSingleFlow<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !Send for SingleProfileSingleFlow<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !Sync for SingleProfileSingleFlow<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> Unpin for SingleProfileSingleFlow<'ctx, CmdCtxTypesT>where
<CmdCtxTypesT as CmdCtxTypes>::Output: Unpin,
<<<CmdCtxTypesT as CmdCtxTypes>::ParamsKeys as ParamsKeys>::WorkspaceParamsKMaybe as KeyMaybe>::Key: Unpin,
<<<CmdCtxTypesT as CmdCtxTypes>::ParamsKeys as ParamsKeys>::ProfileParamsKMaybe as KeyMaybe>::Key: Unpin,
<<<CmdCtxTypesT as CmdCtxTypes>::ParamsKeys as ParamsKeys>::FlowParamsKMaybe as KeyMaybe>::Key: Unpin,
impl<'ctx, CmdCtxTypesT> UnsafeUnpin for SingleProfileSingleFlow<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !UnwindSafe for SingleProfileSingleFlow<'ctx, CmdCtxTypesT>
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.