pub struct CmdCtxMpnfParams<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,{
pub output: OwnedOrMutRef<'ctx, CmdCtxTypesT::Output>,
pub interruptibility: Interruptibility<'static>,
pub workspace: OwnedOrRef<'ctx, Workspace>,
pub profile_filter_fn: Option<ProfileFilterFn>,
pub workspace_params: WorkspaceParamsOpt<<CmdCtxTypesT as CmdCtxTypes>::WorkspaceParamsKey>,
pub profile_to_profile_params: BTreeMap<Profile, ProfileParamsOpt<<CmdCtxTypesT as CmdCtxTypes>::ProfileParamsKey>>,
}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
CmdCtxMpsf. - Read or write flow state – see
CmdCtxMpsf.
Fields§
§output: OwnedOrMutRef<'ctx, CmdCtxTypesT::Output>Output endpoint to return values / errors, and write progress information to.
See OutputWrite.
interruptibility: Interruptibility<'static>The interrupt channel receiver if this CmdExecution is interruptible.
workspace: OwnedOrRef<'ctx, Workspace>Workspace that the peace tool runs in.
profile_filter_fn: Option<ProfileFilterFn>Function to filter the profiles that are accessible by this command.
workspace_params: WorkspaceParamsOpt<<CmdCtxTypesT as CmdCtxTypes>::WorkspaceParamsKey>Workspace params.
profile_to_profile_params: BTreeMap<Profile, ProfileParamsOpt<<CmdCtxTypesT as CmdCtxTypes>::ProfileParamsKey>>Profile params for each profile.
Implementations§
Source§impl<'ctx, CmdCtxTypesT> CmdCtxMpnfParams<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,
impl<'ctx, CmdCtxTypesT> CmdCtxMpnfParams<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,
Sourcepub fn builder() -> CmdCtxMpnfParamsBuilder<'ctx, CmdCtxTypesT, ((), (), (), (), (WorkspaceParamsOpt<<CmdCtxTypesT as CmdCtxTypes>::WorkspaceParamsKey>,), (BTreeMap<Profile, ProfileParamsOpt<<CmdCtxTypesT as CmdCtxTypes>::ProfileParamsKey>>,))>
pub fn builder() -> CmdCtxMpnfParamsBuilder<'ctx, CmdCtxTypesT, ((), (), (), (), (WorkspaceParamsOpt<<CmdCtxTypesT as CmdCtxTypes>::WorkspaceParamsKey>,), (BTreeMap<Profile, ProfileParamsOpt<<CmdCtxTypesT as CmdCtxTypes>::ProfileParamsKey>>,))>
Create a builder for building CmdCtxMpnfParams.
On the builder, call .output(...), .interruptibility(...)(optional), .workspace(...), .profile_filter_fn(...)(optional) to set the values of the fields.
Finally, call .build_partial() to create the instance of CmdCtxMpnfParams.
Trait Implementations§
Auto Trait Implementations§
impl<'ctx, CmdCtxTypesT> Freeze for CmdCtxMpnfParams<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !RefUnwindSafe for CmdCtxMpnfParams<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !Send for CmdCtxMpnfParams<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !Sync for CmdCtxMpnfParams<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> Unpin for CmdCtxMpnfParams<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !UnwindSafe for CmdCtxMpnfParams<'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.