Skip to main content

apply_policy

Function apply_policy 

Source
pub fn apply_policy(
    policy: RobotsPolicy,
    decision: RobotsDecision,
) -> PolicyOutcome
Expand description

Apply a RobotsPolicy to a RobotsDecision. The single source of truth for how a decision maps to a concrete action.

This helper exists so both recon and production use the same reducer. Without it, two callers could each implement their own match and reintroduce the very bug T111 exists to prevent.