pub struct CmdCtxMpsfFields<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,{Show 18 fields
pub interruptibility_state: InterruptibilityState<'static, 'static>,
pub workspace: OwnedOrRef<'ctx, Workspace>,
pub profiles: Vec<Profile>,
pub profile_dirs: BTreeMap<Profile, ProfileDir>,
pub profile_history_dirs: BTreeMap<Profile, ProfileHistoryDir>,
pub flow: OwnedOrRef<'ctx, Flow<CmdCtxTypesT::AppError>>,
pub flow_dirs: BTreeMap<Profile, FlowDir>,
pub workspace_params_type_reg: TypeReg<CmdCtxTypesT::WorkspaceParamsKey, BoxDt>,
pub workspace_params: WorkspaceParams<CmdCtxTypesT::WorkspaceParamsKey>,
pub profile_params_type_reg: TypeReg<CmdCtxTypesT::ProfileParamsKey, BoxDt>,
pub profile_to_profile_params: BTreeMap<Profile, ProfileParams<CmdCtxTypesT::ProfileParamsKey>>,
pub flow_params_type_reg: TypeReg<CmdCtxTypesT::FlowParamsKey, BoxDt>,
pub profile_to_flow_params: BTreeMap<Profile, FlowParams<CmdCtxTypesT::FlowParamsKey>>,
pub profile_to_states_current_stored: BTreeMap<Profile, Option<StatesCurrentStored>>,
pub params_specs_type_reg: ParamsSpecsTypeReg,
pub profile_to_params_specs: BTreeMap<Profile, ParamsSpecs>,
pub states_type_reg: StatesTypeReg,
pub resources: Resources<SetUp>,
}Expand description
Fields of CmdCtxMpsf.
§Design
This is necessary so that the output can be separated from the fields
during execution.
Fields§
§interruptibility_state: InterruptibilityState<'static, 'static>Whether the CmdExecution is interruptible.
If it is, this holds the interrupt channel receiver.
workspace: OwnedOrRef<'ctx, Workspace>Workspace that the peace tool runs in.
profiles: Vec<Profile>The profiles that are accessible by this command.
profile_dirs: BTreeMap<Profile, ProfileDir>Profile directories that store params and flows.
profile_history_dirs: BTreeMap<Profile, ProfileHistoryDir>Directories of each profile’s execution history.
flow: OwnedOrRef<'ctx, Flow<CmdCtxTypesT::AppError>>The chosen process flow.
flow_dirs: BTreeMap<Profile, FlowDir>Flow directory that stores params and states.
workspace_params_type_reg: TypeReg<CmdCtxTypesT::WorkspaceParamsKey, BoxDt>Type registry for WorkspaceParams deserialization.
workspace_params: WorkspaceParams<CmdCtxTypesT::WorkspaceParamsKey>Workspace params.
profile_params_type_reg: TypeReg<CmdCtxTypesT::ProfileParamsKey, BoxDt>Type registry for ProfileParams deserialization.
profile_to_profile_params: BTreeMap<Profile, ProfileParams<CmdCtxTypesT::ProfileParamsKey>>Profile params for the profile.
flow_params_type_reg: TypeReg<CmdCtxTypesT::FlowParamsKey, BoxDt>Type registry for FlowParams deserialization.
profile_to_flow_params: BTreeMap<Profile, FlowParams<CmdCtxTypesT::FlowParamsKey>>Flow params for the selected flow.
profile_to_states_current_stored: BTreeMap<Profile, Option<StatesCurrentStored>>Stored current states for each profile for the selected flow.
params_specs_type_reg: ParamsSpecsTypeRegType registry for each item’s Params::Spec.
This is used to deserialize ParamsSpecsFile.
profile_to_params_specs: BTreeMap<Profile, ParamsSpecs>Item params specs for each profile for the selected flow.
states_type_reg: StatesTypeRegType registry for each item’s State.
This is used to deserialize StatesCurrentFile and
StatesGoalFile.
resources: Resources<SetUp>Resources for flow execution.
Implementations§
Source§impl<CmdCtxTypesT> CmdCtxMpsfFields<'_, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,
impl<CmdCtxTypesT> CmdCtxMpsfFields<'_, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes,
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 flow_dirs(&self) -> &BTreeMap<Profile, FlowDir>
pub fn flow_dirs(&self) -> &BTreeMap<Profile, FlowDir>
Returns the flow directories keyed by each profile.
Sourcepub fn workspace_params_type_reg(
&self,
) -> &TypeReg<CmdCtxTypesT::WorkspaceParamsKey, BoxDt>
pub fn workspace_params_type_reg( &self, ) -> &TypeReg<CmdCtxTypesT::WorkspaceParamsKey, BoxDt>
Returns a reference to the workspace params type registry.
Sourcepub fn workspace_params_type_reg_mut(
&mut self,
) -> &mut TypeReg<CmdCtxTypesT::WorkspaceParamsKey, BoxDt>
pub fn workspace_params_type_reg_mut( &mut self, ) -> &mut TypeReg<CmdCtxTypesT::WorkspaceParamsKey, BoxDt>
Returns a mutable reference to the workspace params type registry.
Sourcepub fn workspace_params(
&self,
) -> &WorkspaceParams<CmdCtxTypesT::WorkspaceParamsKey>
pub fn workspace_params( &self, ) -> &WorkspaceParams<CmdCtxTypesT::WorkspaceParamsKey>
Returns the workspace params.
Sourcepub fn workspace_params_mut(
&mut self,
) -> &mut WorkspaceParams<CmdCtxTypesT::WorkspaceParamsKey>
pub fn workspace_params_mut( &mut self, ) -> &mut WorkspaceParams<CmdCtxTypesT::WorkspaceParamsKey>
Returns the workspace params.
Sourcepub fn profile_params_type_reg(
&self,
) -> &TypeReg<CmdCtxTypesT::ProfileParamsKey, BoxDt>
pub fn profile_params_type_reg( &self, ) -> &TypeReg<CmdCtxTypesT::ProfileParamsKey, BoxDt>
Returns a reference to the profile params type registry.
Sourcepub fn profile_params_type_reg_mut(
&mut self,
) -> &mut TypeReg<CmdCtxTypesT::ProfileParamsKey, BoxDt>
pub fn profile_params_type_reg_mut( &mut self, ) -> &mut TypeReg<CmdCtxTypesT::ProfileParamsKey, BoxDt>
Returns a mutable reference to the profile params type registry.
Sourcepub fn profile_to_profile_params(
&self,
) -> &BTreeMap<Profile, ProfileParams<CmdCtxTypesT::ProfileParamsKey>>
pub fn profile_to_profile_params( &self, ) -> &BTreeMap<Profile, ProfileParams<CmdCtxTypesT::ProfileParamsKey>>
Returns the profile params for each profile.
Sourcepub fn profile_to_profile_params_mut(
&mut self,
) -> &mut BTreeMap<Profile, ProfileParams<CmdCtxTypesT::ProfileParamsKey>>
pub fn profile_to_profile_params_mut( &mut self, ) -> &mut BTreeMap<Profile, ProfileParams<CmdCtxTypesT::ProfileParamsKey>>
Returns the profile params for each profile.
Sourcepub fn flow_params_type_reg(
&self,
) -> &TypeReg<CmdCtxTypesT::FlowParamsKey, BoxDt>
pub fn flow_params_type_reg( &self, ) -> &TypeReg<CmdCtxTypesT::FlowParamsKey, BoxDt>
Returns a reference to the flow params type registry.
Sourcepub fn flow_params_type_reg_mut(
&mut self,
) -> &mut TypeReg<CmdCtxTypesT::FlowParamsKey, BoxDt>
pub fn flow_params_type_reg_mut( &mut self, ) -> &mut TypeReg<CmdCtxTypesT::FlowParamsKey, BoxDt>
Returns a mutable reference to the flow params type registry.
Sourcepub fn profile_to_flow_params(
&self,
) -> &BTreeMap<Profile, FlowParams<CmdCtxTypesT::FlowParamsKey>>
pub fn profile_to_flow_params( &self, ) -> &BTreeMap<Profile, FlowParams<CmdCtxTypesT::FlowParamsKey>>
Returns the flow params for each profile.
Sourcepub fn profile_to_flow_params_mut(
&mut self,
) -> &mut BTreeMap<Profile, FlowParams<CmdCtxTypesT::FlowParamsKey>>
pub fn profile_to_flow_params_mut( &mut self, ) -> &mut BTreeMap<Profile, FlowParams<CmdCtxTypesT::FlowParamsKey>>
Returns the flow params for each profile.
Sourcepub fn profile_to_states_current_stored(
&self,
) -> &BTreeMap<Profile, Option<StatesCurrentStored>>
pub fn profile_to_states_current_stored( &self, ) -> &BTreeMap<Profile, Option<StatesCurrentStored>>
Returns the stored current states for each profile for the selected flow.
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 profile_to_params_specs(&self) -> &BTreeMap<Profile, ParamsSpecs>
pub fn profile_to_params_specs(&self) -> &BTreeMap<Profile, ParamsSpecs>
Returns the item params specs for each profile 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.
Trait Implementations§
Source§impl<'ctx, CmdCtxTypesT> Debug for CmdCtxMpsfFields<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes + Debug,
CmdCtxTypesT::AppError: Debug,
CmdCtxTypesT::WorkspaceParamsKey: Debug,
CmdCtxTypesT::ProfileParamsKey: Debug,
CmdCtxTypesT::FlowParamsKey: Debug,
impl<'ctx, CmdCtxTypesT> Debug for CmdCtxMpsfFields<'ctx, CmdCtxTypesT>where
CmdCtxTypesT: CmdCtxTypes + Debug,
CmdCtxTypesT::AppError: Debug,
CmdCtxTypesT::WorkspaceParamsKey: Debug,
CmdCtxTypesT::ProfileParamsKey: Debug,
CmdCtxTypesT::FlowParamsKey: Debug,
Auto Trait Implementations§
impl<'ctx, CmdCtxTypesT> Freeze for CmdCtxMpsfFields<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !RefUnwindSafe for CmdCtxMpsfFields<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !Send for CmdCtxMpsfFields<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> !Sync for CmdCtxMpsfFields<'ctx, CmdCtxTypesT>
impl<'ctx, CmdCtxTypesT> Unpin for CmdCtxMpsfFields<'ctx, CmdCtxTypesT>where
<CmdCtxTypesT as CmdCtxTypes>::WorkspaceParamsKey: Unpin,
<CmdCtxTypesT as CmdCtxTypes>::ProfileParamsKey: Unpin,
<CmdCtxTypesT as CmdCtxTypes>::FlowParamsKey: Unpin,
impl<'ctx, CmdCtxTypesT> !UnwindSafe for CmdCtxMpsfFields<'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.