Crate content_blocker [−] [src]
A library for parsing Safari-style content blocking lists and evaluating them against network requests.
A request that could be filtered.
An encapsulation of a list of parsed rules.
Errors returned when parsing a JSON representation of a list of rules.
The type of load that is being initiated.
The action to take for the provided request.
The type of resource being requested.
Parse a string containing a JSON representation of a content blocker list. Returns a vector of parsed rules, or an error representing the nature of the invalid input. Any rules missing required fields will be silently ignored.
Attempt to match the given request against the provided rules. Returns a list of actions to take in response; an empty list means that the request should continue unmodified.