pub struct InfraPolicy { /* private fields */ }Expand description
Applies a queue policy after task routing; the host owns collection and request lifetimes.
Implementations§
Source§impl InfraPolicy
impl InfraPolicy
Sourcepub fn new(config: InfraPolicyConfig) -> Result<Self>
pub fn new(config: InfraPolicyConfig) -> Result<Self>
Validate the policy once at configuration load.
Sourcepub fn apply(
&self,
outcome: &mut RoutingOutcome,
models: &RuntimeModels,
signals: &InfraSignals,
) -> Result<bool>
pub fn apply( &self, outcome: &mut RoutingOutcome, models: &RuntimeModels, signals: &InfraSignals, ) -> Result<bool>
Adjust a decision-only task result. Returns true only when the model changes.
Hosts must serialize this check with their local in-flight increment, then decrement when the response ends or is cancelled. Worker selection remains in the serving layer.
Auto Trait Implementations§
impl Freeze for InfraPolicy
impl RefUnwindSafe for InfraPolicy
impl Send for InfraPolicy
impl Sync for InfraPolicy
impl Unpin for InfraPolicy
impl UnsafeUnpin for InfraPolicy
impl UnwindSafe for InfraPolicy
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