Skip to main content

RoutePolicy

Struct RoutePolicy 

Source
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: u8

Number of terminal structural or semantic failures allowed on a target before the router escalates to the next target.

§repair_retries: u8

BRIDGE bounded-repair retry count used inside one target before a structural failure is counted.

§verify_catalog: VerifyCatalog

Semantic verifier catalog that checks decoded answers.

Implementations§

Source§

impl<'a> RoutePolicy<'a>

Source

pub fn new(ladder: Vec<RouteTarget<'a>>, escalate_after: u8) -> Self

Builds a route policy with default one-shot escalation and BRIDGE repair.

Source

pub fn with_repair_retries(self, repair_retries: u8) -> Self

Returns this policy with an explicit repair retry count.

Source

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> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.