pub struct BatchExecutionResult {
pub results: Vec<Message>,
pub panicked: bool,
}Expand description
批量执行结果 — 长度、顺序、完整性三重保证。
不变量:
results.len() == calls.len()永远成立results[i]对应calls[i]的执行结果(原始顺序)- panic 永远被转换成
ToolResult(is_error: true),不会丢失 panicked仅作为观测信号,不改变结果完整性
Fields§
§results: Vec<Message>按原始调用顺序排列的工具结果,长度等于输入 calls 长度。
panicked: bool是否有任意 spawned task panic(仅作为观测信号)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatchExecutionResult
impl RefUnwindSafe for BatchExecutionResult
impl Send for BatchExecutionResult
impl Sync for BatchExecutionResult
impl Unpin for BatchExecutionResult
impl UnsafeUnpin for BatchExecutionResult
impl UnwindSafe for BatchExecutionResult
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