pub struct AgentExecutionResult {
pub event: PipelineEvent,
pub session_id: Option<String>,
}Expand description
Result of executing an agent.
Contains the pipeline event and optional session_id for session continuation.
§Session ID Handling
When session_id is Some, the handler MUST emit a separate SessionEstablished
event to the reducer. This is the proper way to handle session IDs in the reducer
architecture - each piece of information is communicated via a dedicated event.
The handler should:
- Process
eventthrough the reducer - If
session_id.is_some(), emitSessionEstablishedand process it
This two-event approach ensures:
- Clean separation of concerns (success vs session establishment)
- Proper state transitions in the reducer
- Session ID is stored in agent_chain.last_session_id for XSD retry reuse
Fields§
§event: PipelineEventThe pipeline event from agent execution (success or failure).
session_id: Option<String>Session ID from agent’s init event, for XSD retry session continuation.
When present, handler must emit SessionEstablished event separately.
Auto Trait Implementations§
impl Freeze for AgentExecutionResult
impl RefUnwindSafe for AgentExecutionResult
impl Send for AgentExecutionResult
impl Sync for AgentExecutionResult
impl Unpin for AgentExecutionResult
impl UnwindSafe for AgentExecutionResult
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more