pub enum RelativeSelectorMatchHint {
InSubtree,
InChild,
InNextSibling,
InNextSiblingSubtree,
InSibling,
InSiblingSubtree,
}
Expand description
Flag indicating where a given relative selector’s match would be contained.
Variants§
InSubtree
Within this element’s subtree.
InChild
Within this element’s direct children.
InNextSibling
This element’s next sibling.
InNextSiblingSubtree
Within this element’s next sibling’s subtree.
InSibling
Within this element’s subsequent siblings.
InSiblingSubtree
Across this element’s subsequent siblings and their subtrees.
Implementations§
source§impl RelativeSelectorMatchHint
impl RelativeSelectorMatchHint
sourcepub fn new(
relative_combinator: Combinator,
has_child_or_descendants: bool,
has_adjacent_or_next_siblings: bool,
) -> Self
pub fn new( relative_combinator: Combinator, has_child_or_descendants: bool, has_adjacent_or_next_siblings: bool, ) -> Self
Create a new relative selector match hint based on its composition.
sourcepub fn is_descendant_direction(&self) -> bool
pub fn is_descendant_direction(&self) -> bool
Is the match traversal direction towards the descendant of this element (As opposed to siblings)?
sourcepub fn is_next_sibling(&self) -> bool
pub fn is_next_sibling(&self) -> bool
Is the match traversal terminated at the next sibling?
sourcepub fn is_subtree(&self) -> bool
pub fn is_subtree(&self) -> bool
Does the match involve matching the subtree?
Trait Implementations§
source§impl Clone for RelativeSelectorMatchHint
impl Clone for RelativeSelectorMatchHint
source§fn clone(&self) -> RelativeSelectorMatchHint
fn clone(&self) -> RelativeSelectorMatchHint
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 ToShmem for RelativeSelectorMatchHint
impl ToShmem for RelativeSelectorMatchHint
impl Copy for RelativeSelectorMatchHint
impl Eq for RelativeSelectorMatchHint
impl StructuralPartialEq for RelativeSelectorMatchHint
Auto Trait Implementations§
impl Freeze for RelativeSelectorMatchHint
impl RefUnwindSafe for RelativeSelectorMatchHint
impl Send for RelativeSelectorMatchHint
impl Sync for RelativeSelectorMatchHint
impl Unpin for RelativeSelectorMatchHint
impl UnwindSafe for RelativeSelectorMatchHint
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)