pub fn evaluate(
script: &PacScript,
url: &Url,
policy: &PacPolicy,
) -> Result<Vec<ProxyStep>, Error>Available on crate feature
pac only.Expand description
Evaluate script for url under policy (sanitize_url first).
This function uses pac-quickjs. Enabling pac-windows-native adds
WinHttpPacResolver, which is separate from this function’s engine. PacResolver
routes configurations between that resolver and this function.
A URL with no host (data:, mailto:) is still evaluated, with host empty:
resolve_with_pac and the native resolvers’ resolve_config answer Direct for those
without running anything. This is the engine door, not a routing entry point.
§Errors
Error::PacEngineUnavailable with no engine, else PacEvaluator::evaluate.