pub struct RoutePolicy<'a> {
pub ladder: Vec<RouteTarget<'a>>,
pub escalate_after: u8,
pub repair_retries: u8,
pub verify_catalog: VerifyCatalog,
}Expand description
Cost-aware route policy for a compiled intent call.
Fields§
§ladder: Vec<RouteTarget<'a>>Cheap-first ordered ladder of eval targets.
escalate_after: u8Number of terminal structural or semantic failures allowed on a target before the router escalates to the next target.
repair_retries: u8BRIDGE bounded-repair retry count used inside one target before a structural failure is counted.
verify_catalog: VerifyCatalogSemantic verifier catalog that checks decoded answers.
Implementations§
Source§impl<'a> RoutePolicy<'a>
impl<'a> RoutePolicy<'a>
Sourcepub fn new(ladder: Vec<RouteTarget<'a>>, escalate_after: u8) -> Self
pub fn new(ladder: Vec<RouteTarget<'a>>, escalate_after: u8) -> Self
Builds a route policy with default one-shot escalation and BRIDGE repair.
Sourcepub fn with_repair_retries(self, repair_retries: u8) -> Self
pub fn with_repair_retries(self, repair_retries: u8) -> Self
Returns this policy with an explicit repair retry count.
Sourcepub fn with_verify_catalog(self, verify_catalog: VerifyCatalog) -> Self
pub fn with_verify_catalog(self, verify_catalog: VerifyCatalog) -> Self
Returns this policy with an explicit semantic verifier catalog.
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for RoutePolicy<'a>
impl<'a> !UnwindSafe for RoutePolicy<'a>
impl<'a> Freeze for RoutePolicy<'a>
impl<'a> Send for RoutePolicy<'a>
impl<'a> Sync for RoutePolicy<'a>
impl<'a> Unpin for RoutePolicy<'a>
impl<'a> UnsafeUnpin for RoutePolicy<'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