pub struct SubagentFinishedEvent {
pub base: BaseEvent,
pub subagent_run_id: SubagentRunId,
pub result: Option<Value>,
pub outcome: Option<SubagentOutcome>,
}Expand description
Closes a subagent invocation’s stream segment for this run.
Fields§
§base: BaseEventTimestamp, raw provider event and metadata.
subagent_run_id: SubagentRunIdThe invocation being closed — the id from SUBAGENT_STARTED.
result: Option<Value>The subagent’s completion payload, mirroring RUN_FINISHED.result.
outcome: Option<SubagentOutcome>How it ended. Absent means success (the legacy reading); a JSON null
is rejected — see SubagentOutcome.
Implementations§
Source§impl SubagentFinishedEvent
impl SubagentFinishedEvent
Sourcepub fn new(subagent_run_id: impl Into<SubagentRunId>) -> Self
pub fn new(subagent_run_id: impl Into<SubagentRunId>) -> Self
Closes a subagent invocation without declaring an outcome (legacy shape, read as success).
Sourcepub fn with_result(self, result: impl Into<Value>) -> Self
pub fn with_result(self, result: impl Into<Value>) -> Self
Sets the completion payload.
Sourcepub fn with_outcome(self, outcome: SubagentOutcome) -> Self
pub fn with_outcome(self, outcome: SubagentOutcome) -> Self
Sets the outcome.
Trait Implementations§
Source§impl Clone for SubagentFinishedEvent
impl Clone for SubagentFinishedEvent
Source§fn clone(&self) -> SubagentFinishedEvent
fn clone(&self) -> SubagentFinishedEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComposeSchema for SubagentFinishedEvent
impl ComposeSchema for SubagentFinishedEvent
Source§impl Debug for SubagentFinishedEvent
impl Debug for SubagentFinishedEvent
Source§impl Default for SubagentFinishedEvent
impl Default for SubagentFinishedEvent
Source§fn default() -> SubagentFinishedEvent
fn default() -> SubagentFinishedEvent
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SubagentFinishedEvent
impl<'de> Deserialize<'de> for SubagentFinishedEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<SubagentFinishedEvent> for Event
impl From<SubagentFinishedEvent> for Event
Source§fn from(payload: SubagentFinishedEvent) -> Self
fn from(payload: SubagentFinishedEvent) -> Self
Converts to this type from the input type.
Source§impl JsonSchema for SubagentFinishedEvent
impl JsonSchema for SubagentFinishedEvent
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for SubagentFinishedEvent
impl PartialEq for SubagentFinishedEvent
Source§fn eq(&self, other: &SubagentFinishedEvent) -> bool
fn eq(&self, other: &SubagentFinishedEvent) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for SubagentFinishedEvent
impl Serialize for SubagentFinishedEvent
impl StructuralPartialEq for SubagentFinishedEvent
Auto Trait Implementations§
impl Freeze for SubagentFinishedEvent
impl RefUnwindSafe for SubagentFinishedEvent
impl Send for SubagentFinishedEvent
impl Sync for SubagentFinishedEvent
impl Unpin for SubagentFinishedEvent
impl UnsafeUnpin for SubagentFinishedEvent
impl UnwindSafe for SubagentFinishedEvent
Blanket Implementations§
impl<T> AgentState for T
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