pub struct MultiProfileNoFlow<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,{ /* private fields */ }Expand description
A command that works with multiple profiles, not scoped to a flow.
path/to/repo/.peace/envman
|- 📝 workspace_params.yaml # ✅ can read or write `WorkspaceParams`
|
|- 🌏 internal_dev_a # ✅ can list multiple `Profile`s
| |- 📝 profile_params.yaml # ✅ can read multiple `ProfileParams`
| |
| |- .. # ❌ cannot read or write `Flow` information
|
|- 🌏 customer_a_dev # ✅
| |- 📝 profile_params.yaml # ✅
|
|- 🌏 customer_a_prod # ✅
| |- 📝 profile_params.yaml # ✅
|
|- 🌏 workspace_init # ✅ can list multiple `Profile`s
|- 📝 profile_params.yaml # ❌ cannot read profile params of different underlying type§Capabilities
This kind of command can:
- Read or write workspace parameters.
- Read or write multiple profiles’ parameters – as long as they are of
the same type (same
struct).
This kind of command cannot:
- Read or write flow parameters – see
MultiProfileNoFloworMultiProfileSingleFlow. - Read or write flow state – see
MultiProfileNoFloworMultiProfileSingleFlow.
Implementations§
Source§impl<'ctx, CmdCtxTypesT> MultiProfileNoFlow<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,
impl<'ctx, CmdCtxTypesT> MultiProfileNoFlow<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,
Sourcepub fn view(&mut self) -> MultiProfileNoFlowView<'_, CmdCtxTypesT>
pub fn view(&mut self) -> MultiProfileNoFlowView<'_, CmdCtxTypesT>
Returns a view struct of this scope.
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 profiles(&self) -> &[Profile]
pub fn profiles(&self) -> &[Profile]
Returns the accessible profiles.
These are the profiles that are filtered by the filter function, if provided.
Sourcepub fn profile_dirs(&self) -> &BTreeMap<Profile, ProfileDir>
pub fn profile_dirs(&self) -> &BTreeMap<Profile, ProfileDir>
Returns the profile directories keyed by each profile.
Sourcepub fn profile_history_dirs(&self) -> &BTreeMap<Profile, ProfileHistoryDir>
pub fn profile_history_dirs(&self) -> &BTreeMap<Profile, ProfileHistoryDir>
Returns the profile history directories keyed by each profile.
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.
Source§impl<CmdCtxTypesT, WorkspaceParamsK, ProfileParamsKMaybe, FlowParamsKMaybe> MultiProfileNoFlow<'_, 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> MultiProfileNoFlow<'_, 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> MultiProfileNoFlow<'_, 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> MultiProfileNoFlow<'_, 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_to_profile_params(
&self,
) -> &BTreeMap<Profile, ProfileParams<ProfileParamsK>>
pub fn profile_to_profile_params( &self, ) -> &BTreeMap<Profile, ProfileParams<ProfileParamsK>>
Returns the profile params for each profile.
Trait Implementations§
Auto Trait Implementations§
impl<'ctx, CmdCtxTypesT> Freeze for MultiProfileNoFlow<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !RefUnwindSafe for MultiProfileNoFlow<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !Send for MultiProfileNoFlow<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !Sync for MultiProfileNoFlow<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> Unpin for MultiProfileNoFlow<'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 MultiProfileNoFlow<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !UnwindSafe for MultiProfileNoFlow<'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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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)
Converts
&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)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.