pub struct PendingEdge<'a> { /* private fields */ }Expand description
待完成的边 — 链式调用的中间句柄。
由 GraphBuilder::edge() / edge_if() / edge_fallback() 返回。
通过 .max_visits(n) 附加循环分析约束。
ⓘ
// 条件回跳 + 循环分析
g.edge_if("b", "a", |s| s.should_retry)?.max_visits(5);
// 普通边 + 循环分析
g.edge("b", "a").max_visits(5);
// 不加分析(直接丢弃 PendingEdge)
g.edge("b", "end");Implementations§
Source§impl<'a> PendingEdge<'a>
impl<'a> PendingEdge<'a>
Sourcepub fn max_visits(self, n: usize) -> &'a mut GraphBuilder
pub fn max_visits(self, n: usize) -> &'a mut GraphBuilder
附加循环分析约束(建议的最大访问次数)。
仅用于 analyze_cycles() 静态诊断,不参与运行时路由。
返回 &mut GraphBuilder 以便继续链式调用。
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PendingEdge<'a>
impl<'a> !UnwindSafe for PendingEdge<'a>
impl<'a> Freeze for PendingEdge<'a>
impl<'a> Send for PendingEdge<'a>
impl<'a> Sync for PendingEdge<'a>
impl<'a> Unpin for PendingEdge<'a>
impl<'a> UnsafeUnpin for PendingEdge<'a>
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