Trait html5ever_ext::Selectable
[−]
[src]
pub trait Selectable { fn find_all_matching_child_nodes_depth_first_including_this_one<MatchUser: FnMut(&Rc<Node>) -> bool>(
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool; fn find_all_matching_child_nodes_depth_first_excluding_this_one<MatchUser: FnMut(&Rc<Node>) -> bool>(
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool; fn matches(&self, selector: &OurSelector) -> bool; }
This trait adds methods for finding DOM nodes matching a CSS selector
Required Methods
fn find_all_matching_child_nodes_depth_first_including_this_one<MatchUser: FnMut(&Rc<Node>) -> bool>(
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
Recursively find element nodes that match this selector. Return true from MatchUser to abort early. The result of this function is true if MatchUser aborted early, or false otherwise.
fn find_all_matching_child_nodes_depth_first_excluding_this_one<MatchUser: FnMut(&Rc<Node>) -> bool>(
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
Recursively find element nodes that match this selector. Return true from MatchUser to abort early. The result of this function is true if MatchUser aborted early, or false otherwise.
fn matches(&self, selector: &OurSelector) -> bool
Returns whether this element matches this selector. For the RcDom and &'a RcDom, is currently always false.
Implementations on Foreign Types
impl<'a> Selectable for &'a [RcDom]
[src]
Use this to match a list of HTML documents.
fn find_all_matching_child_nodes_depth_first_excluding_this_one<MatchUser: FnMut(&Rc<Node>) -> bool>(
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
[src]
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
fn find_all_matching_child_nodes_depth_first_including_this_one<MatchUser: FnMut(&Rc<Node>) -> bool>(
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
[src]
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
fn matches(&self, selector: &OurSelector) -> bool
[src]
impl<'a> Selectable for Rc<Node>
[src]
fn find_all_matching_child_nodes_depth_first_excluding_this_one<MatchUser: FnMut(&Rc<Node>) -> bool>(
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
[src]
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
fn find_all_matching_child_nodes_depth_first_including_this_one<MatchUser: FnMut(&Rc<Node>) -> bool>(
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
[src]
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
fn matches(&self, selector: &OurSelector) -> bool
[src]
impl Selectable for RefCell<Vec<Rc<Node>>>
[src]
Use this to match on the children of a Rc
fn find_all_matching_child_nodes_depth_first_excluding_this_one<MatchUser: FnMut(&Rc<Node>) -> bool>(
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
[src]
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
fn find_all_matching_child_nodes_depth_first_including_this_one<MatchUser: FnMut(&Rc<Node>) -> bool>(
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
[src]
&self,
selector: &OurSelector,
match_user: &mut MatchUser
) -> bool
fn matches(&self, selector: &OurSelector) -> bool
[src]
Implementors
impl Selectable for RcDom