pub struct MatchOptions<'a> {
pub url: Option<&'a str>,
pub budget: Option<Duration>,
}Expand description
What matching needs that a document doesn’t carry. The default has
none of it, so :target and :local-link match nothing.
Fields§
§url: Option<&'a str>The document’s URL, for :target, :target-within and :local-link.
budget: Option<Duration>Give up after this long. Most selectors cost a walk of the tree,
but some cost more on some pages: a descendant combinator over a
very deep tree, :has() of more than one compound. A crawler
matching pages it doesn’t control should set one. Only
SelectorList::try_select_with and
SelectorList::try_matches_with read it; the clock is read every
1,024 compounds matched.
Trait Implementations§
Source§impl<'a> Clone for MatchOptions<'a>
impl<'a> Clone for MatchOptions<'a>
Source§fn clone(&self) -> MatchOptions<'a>
fn clone(&self) -> MatchOptions<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for MatchOptions<'a>
Source§impl<'a> Debug for MatchOptions<'a>
impl<'a> Debug for MatchOptions<'a>
Source§impl<'a> Default for MatchOptions<'a>
impl<'a> Default for MatchOptions<'a>
Source§fn default() -> MatchOptions<'a>
fn default() -> MatchOptions<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Forget for MatchOptions<'a>
impl<'a> Freeze for MatchOptions<'a>
impl<'a> Move for MatchOptions<'a>
impl<'a> RefUnwindSafe for MatchOptions<'a>
impl<'a> Send for MatchOptions<'a>
impl<'a> Sync for MatchOptions<'a>
impl<'a> Unpin for MatchOptions<'a>
impl<'a> UnsafeUnpin for MatchOptions<'a>
impl<'a> UnwindSafe for MatchOptions<'a>
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