pub struct AnchorConfig {
pub source: &'static str,
pub limit: usize,
pub item_regex: &'static Regex,
pub url_group: usize,
pub title_group: usize,
pub snippet_group: Option<usize>,
pub url_transform: Option<fn(&str) -> String>,
pub skip: Option<fn(&str) -> bool>,
}Expand description
Configuration for parse_anchor_list, mirroring the JS parseAnchorList
per-engine descriptor.
Fields§
§source: &'static strProvider id recorded as the result source.
limit: usizeMax results to return.
item_regex: &'static RegexCompiled item regex; capture groups feed the fields below.
url_group: usizeCapture-group index for the URL.
title_group: usizeCapture-group index for the title.
snippet_group: Option<usize>Optional capture-group index for the snippet.
url_transform: Option<fn(&str) -> String>Optional URL normalizer applied before dedup/skip checks.
skip: Option<fn(&str) -> bool>Optional predicate; return true to drop a URL.
Auto Trait Implementations§
impl Freeze for AnchorConfig
impl RefUnwindSafe for AnchorConfig
impl Send for AnchorConfig
impl Sync for AnchorConfig
impl Unpin for AnchorConfig
impl UnsafeUnpin for AnchorConfig
impl UnwindSafe for AnchorConfig
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