pub struct StepResult {
pub outcome: StepOutcome,
pub artifacts: Vec<(ArtifactId, ArtifactValue)>,
}Expand description
Result of executing a step.
Handlers return this instead of mutating context. The executor uses it to accumulate state.
Fields§
§outcome: StepOutcomeStep outcome (completed or skipped).
artifacts: Vec<(ArtifactId, ArtifactValue)>Artifacts produced by this step.
Implementations§
Source§impl StepResult
impl StepResult
Sourcepub fn completed(message: impl Into<String>) -> Self
pub fn completed(message: impl Into<String>) -> Self
Create a completed result with no artifacts.
Sourcepub fn completed_with_artifact(
message: impl Into<String>,
id: ArtifactId,
value: ArtifactValue,
) -> Self
pub fn completed_with_artifact( message: impl Into<String>, id: ArtifactId, value: ArtifactValue, ) -> Self
Create a completed result with one artifact.
Sourcepub fn with_artifact(self, id: ArtifactId, value: ArtifactValue) -> Self
pub fn with_artifact(self, id: ArtifactId, value: ArtifactValue) -> Self
Add an artifact to the result.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StepResult
impl RefUnwindSafe for StepResult
impl Send for StepResult
impl Sync for StepResult
impl Unpin for StepResult
impl UnsafeUnpin for StepResult
impl UnwindSafe for StepResult
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