Enum selectors::context::VisitedHandlingMode
source · pub enum VisitedHandlingMode {
AllLinksUnvisited,
AllLinksVisitedAndUnvisited,
RelevantLinkVisited,
}
Expand description
The mode to use when matching unvisited and visited links.
Variants§
AllLinksUnvisited
All links are matched as if they are unvisted.
AllLinksVisitedAndUnvisited
All links are matched as if they are visited and unvisited (both :link and :visited match).
This is intended to be used from invalidation code, to be conservative about whether we need to restyle a link.
RelevantLinkVisited
A element’s “relevant link” is the element being matched if it is a link or the nearest ancestor link. The relevant link is matched as though it is visited, and all other links are matched as if they are unvisited.
Implementations§
source§impl VisitedHandlingMode
impl VisitedHandlingMode
pub fn matches_visited(&self) -> bool
pub fn matches_unvisited(&self) -> bool
Trait Implementations§
source§impl Clone for VisitedHandlingMode
impl Clone for VisitedHandlingMode
source§fn clone(&self) -> VisitedHandlingMode
fn clone(&self) -> VisitedHandlingMode
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for VisitedHandlingMode
impl Debug for VisitedHandlingMode
source§impl PartialEq for VisitedHandlingMode
impl PartialEq for VisitedHandlingMode
source§fn eq(&self, other: &VisitedHandlingMode) -> bool
fn eq(&self, other: &VisitedHandlingMode) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for VisitedHandlingMode
impl Eq for VisitedHandlingMode
impl StructuralPartialEq for VisitedHandlingMode
Auto Trait Implementations§
impl Freeze for VisitedHandlingMode
impl RefUnwindSafe for VisitedHandlingMode
impl Send for VisitedHandlingMode
impl Sync for VisitedHandlingMode
impl Unpin for VisitedHandlingMode
impl UnwindSafe for VisitedHandlingMode
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