Skip to main content

budget_selection

Function budget_selection 

Source
pub fn budget_selection(
    ap: &ActivePlugins,
    req: &SelectionRequest,
    items: &[ContextItem],
    budget: usize,
) -> Result<Option<Vec<String>>>
Expand description

Budget-optimizer selection (§124 item 27): the single declaring budget-optimizer:* extension replaces budget selection via the plugin’s selection.optimize op (input: ranked ids + budget; output selected: [ids]). Zero declarers = None (caller runs the default). Two+ declarers = hard error (spec §32: no silent last-wins for exclusive policy slots). Unknown ids in the plugin answer fail loudly; an empty answer is honored (select nothing).