pub struct RunResult {
pub run_id: RunId,
pub status: RunStatus,
pub output: String,
pub structured_output: Option<StructuredOutputArtifacts>,
}Expand description
Holds run result application-layer state or configuration. Use it with the documented coordinator methods; run, journal, event, provider, or port effects are called out on those methods rather than on construction.
Fields§
§run_id: RunIdRun identifier used for lineage, filtering, replay, and dedupe.
status: RunStatusFinite status for this record or lifecycle stage.
output: StringOutput used by this record or request.
structured_output: Option<StructuredOutputArtifacts>Optional structured output value. When absent, callers should use the documented default or skip that optional behavior.
Implementations§
Source§impl RunResult
impl RunResult
Sourcepub fn new(run_id: RunId, status: RunStatus, output: impl Into<String>) -> Self
pub fn new(run_id: RunId, status: RunStatus, output: impl Into<String>) -> Self
Creates a new application::run value with explicit caller-provided inputs. This constructor is data-only and performs no I/O or external side effects.
Sourcepub fn with_structured_output(
self,
structured_output: StructuredOutputArtifacts,
) -> Self
pub fn with_structured_output( self, structured_output: StructuredOutputArtifacts, ) -> Self
Returns this value with its structured output setting replaced. The method follows builder-style data construction and does not execute external work.
Sourcepub fn with_structured_output_if_present(
self,
structured_output: Option<StructuredOutputArtifacts>,
) -> Self
pub fn with_structured_output_if_present( self, structured_output: Option<StructuredOutputArtifacts>, ) -> Self
Returns this value with its structured output if present setting replaced. The method follows builder-style data construction and does not execute external work.
Sourcepub fn structured_output<T, D>(
&self,
deserializer: &D,
) -> Result<StructuredOutputResult<T>, TypedOutputError>where
D: TypedOutputDeserializer<T>,
pub fn structured_output<T, D>(
&self,
deserializer: &D,
) -> Result<StructuredOutputResult<T>, TypedOutputError>where
D: TypedOutputDeserializer<T>,
Structured output. This decodes structured output from the completed run result and does not rerun validation or call a provider.