pub struct AgentReply<A> {
pub answer: A,
pub environment_id: Option<String>,
pub account_id: Option<Uuid>,
}Expand description
What an agent step answered, with the metadata the provider attached to it.
Returned by WorkflowContext::agent_with_meta. It keeps the typed answer
of a step built with
output::<T>() next to the
environment and account the step ran on.
§Examples
use ironflow_engine::context::AgentReply;
let reply = AgentReply {
answer: 42_u32,
environment_id: Some("ironflow-env-0a1b2c".to_string()),
account_id: None,
};
assert_eq!(reply.environment_id.as_deref(), Some("ironflow-env-0a1b2c"));Fields§
§answer: AThe answer of the step: the typed T with .output::<T>(), the raw
StepOutput otherwise.
environment_id: Option<String>Claim name to pass to
AgentStepConfig::resume_environment.
None on providers without persistent environments.
account_id: Option<Uuid>Provider Account the step ran on. None when the worker environment
was used.
Trait Implementations§
Source§impl<A: Clone> Clone for AgentReply<A>
impl<A: Clone> Clone for AgentReply<A>
Source§impl<A: Debug> Debug for AgentReply<A>
impl<A: Debug> Debug for AgentReply<A>
Source§impl<A: PartialEq> PartialEq for AgentReply<A>
impl<A: PartialEq> PartialEq for AgentReply<A>
impl<A: PartialEq> StructuralPartialEq for AgentReply<A>
Auto Trait Implementations§
impl<A> Freeze for AgentReply<A>where
A: Freeze,
impl<A> RefUnwindSafe for AgentReply<A>where
A: RefUnwindSafe,
impl<A> Send for AgentReply<A>where
A: Send,
impl<A> Sync for AgentReply<A>where
A: Sync,
impl<A> Unpin for AgentReply<A>where
A: Unpin,
impl<A> UnsafeUnpin for AgentReply<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for AgentReply<A>where
A: UnwindSafe,
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