pub struct NodeOutput {
pub deltas: Vec<StateDelta>,
pub next: NextStep,
pub metadata: Option<NodeMetadata>,
}Expand description
节点执行输出 — 修改意图 + 下一步。
@deprecated v0.4+ 使用 NodeContext 替代。保留向后兼容。
Fields§
§deltas: Vec<StateDelta>状态增量(节点对 State 的修改意图)
next: NextStep下一步路由
metadata: Option<NodeMetadata>节点元数据(可选)
Implementations§
Source§impl NodeOutput
impl NodeOutput
pub fn new(next: NextStep) -> Self
pub fn with_delta(self, delta: StateDelta) -> Self
pub fn with_deltas(self, deltas: Vec<StateDelta>) -> Self
pub fn with_metadata(self, metadata: NodeMetadata) -> Self
pub fn with_token_cost(self, cost: f64) -> Self
pub fn with_side_effects(self) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for NodeOutput
impl RefUnwindSafe for NodeOutput
impl Send for NodeOutput
impl Sync for NodeOutput
impl Unpin for NodeOutput
impl UnsafeUnpin for NodeOutput
impl UnwindSafe for NodeOutput
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