pub enum Message {
System(String),
User(String),
Assistant {
text: Option<String>,
tool_calls: Vec<ToolCall>,
},
ToolResult {
id: String,
content: String,
is_error: bool,
},
}Expand description
One conversation message. Assistant may carry tool calls; ToolResult
feeds a tool’s output back as the next observation (RFC 0007 §loop).
Variants§
System(String)
User(String)
Assistant
ToolResult
A tool/exec result fed back into the loop. is_error carries the MCP
isError: true signal (a tool-domain failure observation, distinct
from a transport error — RFC 0004 §isError).
Implementations§
Trait Implementations§
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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