CmdCtxMpnfFields

Struct CmdCtxMpnfFields 

Source
pub struct CmdCtxMpnfFields<'ctx, CmdCtxTypesT>
where CmdCtxTypesT: CmdCtxTypes,
{ 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 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>>, }
Expand description

Fields of CmdCtxMpnf.

§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.

§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.

Implementations§

Source§

impl<CmdCtxTypesT> CmdCtxMpnfFields<'_, CmdCtxTypesT>
where CmdCtxTypesT: CmdCtxTypes,

Source

pub fn interruptibility_state(&mut self) -> InterruptibilityState<'_, '_>

Returns the interruptibility capability.

Source

pub fn workspace(&self) -> &Workspace

Returns the workspace that the peace tool runs in.

Source

pub fn workspace_dir(&self) -> &WorkspaceDir

Returns a reference to the workspace directory.

Source

pub fn peace_dir(&self) -> &PeaceDir

Returns a reference to the .peace directory.

Source

pub fn peace_app_dir(&self) -> &PeaceAppDir

Returns a reference to the .peace/$app directory.

Source

pub fn profiles(&self) -> &[Profile]

Returns the accessible profiles.

These are the profiles that are filtered by the filter function, if provided.

Source

pub fn profile_dirs(&self) -> &BTreeMap<Profile, ProfileDir>

Returns the profile directories keyed by each profile.

Source

pub fn profile_history_dirs(&self) -> &BTreeMap<Profile, ProfileHistoryDir>

Returns the profile history directories keyed by each profile.

Source

pub fn workspace_params_type_reg( &self, ) -> &TypeReg<CmdCtxTypesT::WorkspaceParamsKey, BoxDt>

Returns a reference to the workspace params type registry.

Source

pub fn workspace_params_type_reg_mut( &mut self, ) -> &mut TypeReg<CmdCtxTypesT::WorkspaceParamsKey, BoxDt>

Returns a mutable reference to the workspace params type registry.

Source

pub fn workspace_params( &self, ) -> &WorkspaceParams<CmdCtxTypesT::WorkspaceParamsKey>

Returns the workspace params.

Source

pub fn workspace_params_mut( &mut self, ) -> &mut WorkspaceParams<CmdCtxTypesT::WorkspaceParamsKey>

Returns the workspace params.

Source

pub fn profile_params_type_reg( &self, ) -> &TypeReg<CmdCtxTypesT::ProfileParamsKey, BoxDt>

Returns a reference to the profile params type registry.

Source

pub fn profile_params_type_reg_mut( &mut self, ) -> &mut TypeReg<CmdCtxTypesT::ProfileParamsKey, BoxDt>

Returns a mutable reference to the profile params type registry.

Source

pub fn profile_to_profile_params( &self, ) -> &BTreeMap<Profile, ProfileParams<CmdCtxTypesT::ProfileParamsKey>>

Returns the profile params for each profile.

Source

pub fn profile_to_profile_params_mut( &mut self, ) -> &mut BTreeMap<Profile, ProfileParams<CmdCtxTypesT::ProfileParamsKey>>

Returns the profile params for each profile.

Trait Implementations§

Source§

impl<'ctx, CmdCtxTypesT> Debug for CmdCtxMpnfFields<'ctx, CmdCtxTypesT>
where CmdCtxTypesT: CmdCtxTypes + Debug, CmdCtxTypesT::WorkspaceParamsKey: Debug, CmdCtxTypesT::ProfileParamsKey: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'ctx, CmdCtxTypesT> Freeze for CmdCtxMpnfFields<'ctx, CmdCtxTypesT>

§

impl<'ctx, CmdCtxTypesT> !RefUnwindSafe for CmdCtxMpnfFields<'ctx, CmdCtxTypesT>

§

impl<'ctx, CmdCtxTypesT> !Send for CmdCtxMpnfFields<'ctx, CmdCtxTypesT>

§

impl<'ctx, CmdCtxTypesT> !Sync for CmdCtxMpnfFields<'ctx, CmdCtxTypesT>

§

impl<'ctx, CmdCtxTypesT> Unpin for CmdCtxMpnfFields<'ctx, CmdCtxTypesT>
where <CmdCtxTypesT as CmdCtxTypes>::WorkspaceParamsKey: Unpin, <CmdCtxTypesT as CmdCtxTypes>::ProfileParamsKey: Unpin,

§

impl<'ctx, CmdCtxTypesT> !UnwindSafe for CmdCtxMpnfFields<'ctx, CmdCtxTypesT>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

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>

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)

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)

Converts &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.