pub struct LoadOpts {
pub sections: SectionPolicy,
pub comments: CommentPolicy,
pub strict_rules: bool,
pub collect_warnings: bool,
}Expand description
Parse-time options for loading a Public Suffix List (PSL) into a RuleSet.
These affect I/O and parsing only; they do not change how lookups behave
at runtime (see MatchOpts for that).
sections: How to handle PSL section markers (ICANN/PRIVATE) during parsing.comments: Which kinds of comment lines to accept while parsing.strict_rules: If true, reject malformed rules with an error instead of skipping them.collect_warnings: If true, collect non-fatal parser warnings (e.g., duplicated rules).
Fields§
§sections: SectionPolicyHow to handle PSL section markers (ICANN/PRIVATE) during parsing.
comments: CommentPolicyWhich kinds of comment lines to accept while parsing.
strict_rules: boolIf true, reject malformed rules with an error instead of skipping them.
collect_warnings: boolIf true, collect non-fatal parser warnings (e.g., duplicated rules).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoadOpts
impl RefUnwindSafe for LoadOpts
impl Send for LoadOpts
impl Sync for LoadOpts
impl Unpin for LoadOpts
impl UnwindSafe for LoadOpts
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more