pub trait AgentAnswer { }Expand description
A type that holds no text written by an agent, except as AgentText.
Required on the T of .output::<T>() for
WorkflowContext::agent and on
AgentRole::Output. Derive it, see the
module documentation. Implemented for numbers, bool, char,
(), AgentText, Uuid, Decimal, and for Option, Vec, Box,
arrays, sets and maps of such types; deliberately not for String, str,
Cow<str>, Box<str> nor serde_json::Value.
§Examples
use ironflow_engine::config::{AgentAnswer, AgentText};
#[derive(AgentAnswer)]
struct Triage {
test: AgentText,
flaky: bool,
}
fn assert_answer<T: AgentAnswer>() {}
assert_answer::<Triage>();
assert_answer::<Vec<Option<AgentText>>>();Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".