Skip to main content

CommandInstance

Struct CommandInstance 

Source
pub struct CommandInstance {
    pub specification: CommandSpecification,
    pub name: String,
    pub block: Block,
    pub package_id: PackageId,
    pub namespace: String,
    pub typing: CommandInstanceType,
}

Fields§

§specification: CommandSpecification§name: String§block: Block§package_id: PackageId§namespace: String§typing: CommandInstanceType

Implementations§

Source§

impl CommandInstance

Source

pub async fn post_process_inputs_evaluations( &self, inputs_evaluation: CommandInputsEvaluationResult, ) -> Result<CommandInputsEvaluationResult, Diagnostic>

Source

pub fn get_group(&self) -> String

Source

pub fn evaluate_pre_conditions( &self, construct_did: &ConstructDid, evaluated_inputs: &CommandInputsEvaluationResult, progress_tx: &Sender<BlockEvent>, background_tasks_uuid: &Uuid, ) -> Result<PreConditionEvaluationResult, Diagnostic>

Source

pub fn check_executability( &mut self, construct_did: &ConstructDid, nested_evaluation_values: &ValueStore, evaluated_inputs: &mut CommandInputsEvaluationResult, _signer_instances: &mut HashMap<ConstructDid, SignerInstance>, action_item_response: &Option<&Vec<ActionItemResponse>>, supervision_context: &RunbookSupervisionContext, auth_context: &AuthorizationContext, ) -> Result<Actions, Diagnostic>

Source

pub async fn perform_execution( &self, construct_did: &ConstructDid, nested_evaluation_values: &ValueStore, evaluated_inputs: &CommandInputsEvaluationResult, action_item_requests: &mut Vec<&mut ActionItemRequest>, _action_item_responses: &Option<&Vec<ActionItemResponse>>, progress_tx: &Sender<BlockEvent>, auth_ctx: &AuthorizationContext, ) -> Result<CommandExecutionResult, Diagnostic>

Source

pub async fn prepare_signed_nested_execution( &self, construct_did: &ConstructDid, evaluated_inputs: &CommandInputsEvaluationResult, signers: SignersState, signer_instances: &HashMap<ConstructDid, SignerInstance>, ) -> Result<(SignersState, Vec<(ConstructDid, ValueStore)>), (SignersState, Diagnostic)>

Source

pub fn prepare_nested_execution( &self, construct_did: &ConstructDid, evaluated_inputs: &CommandInputsEvaluationResult, ) -> Result<Vec<(ConstructDid, ValueStore)>, Diagnostic>

Source

pub async fn check_signed_executability( &mut self, construct_did: &ConstructDid, nested_evaluation_values: &ValueStore, evaluated_inputs: &CommandInputsEvaluationResult, signers: SignersState, signer_instances: &mut HashMap<ConstructDid, SignerInstance>, action_item_response: &Option<&Vec<ActionItemResponse>>, action_item_requests: &Option<&Vec<&mut ActionItemRequest>>, supervision_context: &RunbookSupervisionContext, auth_ctx: &AuthorizationContext, ) -> Result<(SignersState, Actions), (SignersState, Diagnostic)>

Source

pub async fn perform_signed_execution( &self, construct_did: &ConstructDid, nested_evaluation_values: &ValueStore, evaluated_inputs: &CommandInputsEvaluationResult, signers: SignersState, signer_instances: &HashMap<ConstructDid, SignerInstance>, action_item_requests: &mut Vec<&mut ActionItemRequest>, _action_item_responses: &Option<&Vec<ActionItemResponse>>, progress_tx: &Sender<BlockEvent>, auth_context: &AuthorizationContext, ) -> Result<(SignersState, CommandExecutionResult), (SignersState, Diagnostic)>

Source

pub fn build_background_task( &self, construct_did: &ConstructDid, nested_evaluation_values: &ValueStore, evaluated_inputs: &CommandInputsEvaluationResult, execution_result: &CommandExecutionResult, progress_tx: &Sender<BlockEvent>, background_tasks_uuid: &Uuid, supervision_context: &RunbookSupervisionContext, cloud_svc_context: &CloudServiceContext, ) -> CommandExecutionFutureResult

Source

pub fn aggregate_nested_execution_results( &self, construct_did: &ConstructDid, nested_values: &Vec<(ConstructDid, ValueStore)>, commands_execution_results: &HashMap<ConstructDid, CommandExecutionResult>, ) -> Result<CommandExecutionResult, Diagnostic>

Source

pub fn evaluate_post_conditions( &self, construct_did: &ConstructDid, evaluated_inputs: &CommandInputsEvaluationResult, command_execution_results: &mut CommandExecutionResult, progress_tx: &Sender<BlockEvent>, background_tasks_uuid: &Uuid, ) -> Result<PostConditionEvaluationResult, Diagnostic>

Trait Implementations§

Source§

impl Clone for CommandInstance

Source§

fn clone(&self) -> CommandInstance

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ConstructInstance for CommandInstance

Source§

impl Debug for CommandInstance

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Serialize for CommandInstance

Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl WithEvaluatableInputs for CommandInstance

Source§

fn get_expression_from_input(&self, input_name: &str) -> Option<Expression>

Checks the CommandInstance HCL Block for an attribute named input.name

Source§

fn name(&self) -> String

Source§

fn block(&self) -> &Block

Source§

fn get_blocks_for_map( &self, input_name: &str, input_typing: &Type, input_optional: bool, ) -> Result<Option<Vec<Block>>, Vec<Diagnostic>>

Source§

fn get_expression_from_block( &self, block: &Block, prop: &ObjectProperty, ) -> Option<Expression>

Source§

fn get_expression_from_object( &self, input_name: &str, input_typing: &Type, ) -> Result<Option<Expression>, Vec<Diagnostic>>

Source§

fn get_expression_from_object_property( &self, input_name: &str, prop: &ObjectProperty, ) -> Option<Expression>

Source§

fn _spec_inputs(&self) -> Vec<Box<dyn EvaluatableInput>>

Defines the inputs for this trait type with evaluatable inputs
Source§

fn spec_inputs(&self) -> Vec<Box<dyn EvaluatableInput>>

Source§

fn self_referencing_inputs(&self) -> Vec<Box<dyn EvaluatableInput>>

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> MaybeSendSync for T