Skip to main content

ExecutionState

Struct ExecutionState 

Source
pub struct ExecutionState {
    pub params: HashMap<ParamId, Value>,
    pub roles: HashMap<RoleId, String>,
    pub materials: HashMap<MaterialId, String>,
    pub dry_run: bool,
    pub artifacts: HashMap<ArtifactId, ArtifactValue>,
}
Expand description

Complete execution state, recreated after each step.

This struct owns all state that evolves during ceremony execution. Rather than mutating fields, new state is created via ExecutionState::with_material (for materials loaded up front) and via the executor’s internal fold (for step results).

Fields§

§params: HashMap<ParamId, Value>

Resolved parameters (from ceremony defaults, CLI flags, or env vars).

§roles: HashMap<RoleId, String>

Role ID → display name mapping.

§materials: HashMap<MaterialId, String>

Material ID → display name mapping (for showing material titles).

§dry_run: bool

Whether this is a dry run.

§artifacts: HashMap<ArtifactId, ArtifactValue>

Artifacts produced by completed steps and loaded materials.

Implementations§

Source§

impl ExecutionState

Source

pub fn new( params: HashMap<ParamId, Value>, roles: HashMap<RoleId, String>, materials: HashMap<MaterialId, String>, dry_run: bool, ) -> Self

Create initial execution state.

Source

pub fn handler_context(&self) -> HandlerContext<'_>

Create a read-only view for handlers.

Source

pub fn with_material(self, id: ArtifactId, artifact: ArtifactValue) -> Self

Add a material artifact.

Source

pub fn resolve_role(&self, role_id: &RoleId) -> String

Resolve a role ID to a display name.

Trait Implementations§

Source§

impl Debug for ExecutionState

Source§

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

Formats the value using the given formatter. Read more

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> 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> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = !

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.