pub enum TerminalError {
InvalidGraph(String),
NodeNotFound(String),
MissingEdge {
from: String,
to: String,
},
NodeExecutionFailed {
node: String,
source: Box<dyn Error + Send + Sync>,
},
StepsExceeded {
limit: usize,
},
LoopLimitExceeded {
limit: usize,
},
BarrierTimeout {
node: String,
timeout: Duration,
},
BarrierCancelled {
node: String,
},
Unrouted {
node: String,
attempted_conditions: Vec<ConditionEval>,
},
StateError(String),
}Expand description
终止错误 — Graph 执行不可恢复地停止。
Variants§
InvalidGraph(String)
图结构无效(构建时校验遗漏的运行时问题)
NodeNotFound(String)
节点不存在
MissingEdge
Goto 目标缺少对应的边
NodeExecutionFailed
节点执行失败(不可恢复)
StepsExceeded
全局步数超限(运行时熔断)
LoopLimitExceeded
循环超限
BarrierTimeout
Barrier 超时
BarrierCancelled
Barrier 被取消
Unrouted
无匹配边 — 没有任何 outgoing edge 满足条件,且无 fallback
StateError(String)
State 操作错误
Trait Implementations§
Source§impl Debug for TerminalError
impl Debug for TerminalError
Source§impl Display for TerminalError
impl Display for TerminalError
Source§impl Error for TerminalError
impl Error for TerminalError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Auto Trait Implementations§
impl !RefUnwindSafe for TerminalError
impl !UnwindSafe for TerminalError
impl Freeze for TerminalError
impl Send for TerminalError
impl Sync for TerminalError
impl Unpin for TerminalError
impl UnsafeUnpin for TerminalError
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