pub struct CmdCtxMpnf<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,{
pub output: OwnedOrMutRef<'ctx, CmdCtxTypesT::Output>,
pub fields: CmdCtxMpnfFields<'ctx, CmdCtxTypesT>,
}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.
fields: CmdCtxMpnfFields<'ctx, CmdCtxTypesT>Inner fields without the output.
§Design
This is necessary so that the output can be separated from the fields
during execution.
Implementations§
Source§impl<'ctx, CmdCtxTypesT> CmdCtxMpnf<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,
impl<'ctx, CmdCtxTypesT> CmdCtxMpnf<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,
Sourcepub fn builder<'ctx_local>() -> CmdCtxMpnfParamsBuilder<'ctx_local, CmdCtxTypesT>
pub fn builder<'ctx_local>() -> CmdCtxMpnfParamsBuilder<'ctx_local, CmdCtxTypesT>
Returns a [CmdCtxMpnfParamsBuilder] to construct this command context.
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 fields(&self) -> &CmdCtxMpnfFields<'_, CmdCtxTypesT>
pub fn fields(&self) -> &CmdCtxMpnfFields<'_, CmdCtxTypesT>
Returns a reference to the fields.
Sourcepub fn fields_mut(&mut self) -> &mut CmdCtxMpnfFields<'ctx, CmdCtxTypesT>
pub fn fields_mut(&mut self) -> &mut CmdCtxMpnfFields<'ctx, CmdCtxTypesT>
Returns a mutable reference to the fields.
Trait Implementations§
Auto Trait Implementations§
impl<'ctx, CmdCtxTypesT> Freeze for CmdCtxMpnf<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !RefUnwindSafe for CmdCtxMpnf<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !Send for CmdCtxMpnf<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !Sync for CmdCtxMpnf<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> Unpin for CmdCtxMpnf<'ctx, CmdCtxTypesT>where
<CmdCtxTypesT as CmdCtxTypes>::WorkspaceParamsKey: Unpin,
<CmdCtxTypesT as CmdCtxTypes>::ProfileParamsKey: Unpin,
impl<'ctx, CmdCtxTypesT> !UnwindSafe for CmdCtxMpnf<'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.