When adding filters to a FilterSet, use ParseOptions to control how the rules are interpreted. It is recommended to use the struct update syntax with ParseOptions::default() to ensure compatibility with future fields.
Key options include:
format: The FilterFormat to use (e.g., Standard or Hosts). Defaults to FilterFormat::Standard.rule_types: A RuleTypes enum to filter which rules are kept (e.g., All, NetworkOnly, or CosmeticOnly). This can reduce memory usage.permissions: A PermissionMask specifying permissions for the parsed list.
use adblock::lists::{FilterFormat, ParseOptions, RuleTypes};
let parse_options = ParseOptions {
format: FilterFormat::Hosts,
rule_types: RuleTypes::NetworkOnly,
..ParseOptions::default()
};