pub struct AgentTurn {
pub messages: Vec<AgentMessage>,
pub tools: Vec<ToolDefinition>,
}Expand description
Provider-neutral input for one agent turn.
Applications assemble messages and tool definitions, then their provider adapter performs the wire-level request. The turn contract remains useful to deterministic fakes and future application adapters without bringing provider protocol types into this crate.
Fields§
§messages: Vec<AgentMessage>Ordered conversation and tool-result messages.
tools: Vec<ToolDefinition>Tool definitions available for this turn.
Implementations§
Source§impl AgentTurn
impl AgentTurn
Sourcepub fn new(messages: Vec<AgentMessage>, tools: Vec<ToolDefinition>) -> Self
pub fn new(messages: Vec<AgentMessage>, tools: Vec<ToolDefinition>) -> Self
Create a turn from application-owned messages and tool definitions.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AgentTurn
impl RefUnwindSafe for AgentTurn
impl Send for AgentTurn
impl Sync for AgentTurn
impl Unpin for AgentTurn
impl UnsafeUnpin for AgentTurn
impl UnwindSafe for AgentTurn
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